From 22a19c27f8be6f4781fe9ae2b464d65b96e469fc Mon Sep 17 00:00:00 2001 From: profitroll Date: Sat, 6 May 2023 15:21:15 +0200 Subject: [PATCH] Changed discord.utils import --- cogs/custom_channels.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cogs/custom_channels.py b/cogs/custom_channels.py index 3064b22..dea6828 100644 --- a/cogs/custom_channels.py +++ b/cogs/custom_channels.py @@ -1,6 +1,8 @@ -from discord import ApplicationContext, option, utils, Embed -from discord.ext import commands +from discord import ApplicationContext, Embed, option +from discord import utils as ds_utils from discord.commands import SlashCommandGroup +from discord.ext import commands + from classes.holo_user import HoloUser from enums.colors import Color from modules.utils import config_get @@ -31,7 +33,7 @@ class CustomChannels(commands.Cog): created_channel = await ctx.user.guild.create_text_channel( name=name, reason=f"Користувач {guild_name(ctx.user)} купив канал", - category=utils.get( + category=ds_utils.get( ctx.author.guild.categories, id=await config_get("customchannels", "categories"), ), @@ -62,7 +64,7 @@ class CustomChannels(commands.Cog): bots = await config_get("bots") for bot in bots: await created_channel.set_permissions( - utils.get(ctx.user.guild.roles, id=bots[bot]["role"]), + ds_utils.get(ctx.user.guild.roles, id=bots[bot]["role"]), view_channel=False, ) else: @@ -88,7 +90,7 @@ class CustomChannels(commands.Cog): ): holo_user_ctx = HoloUser(ctx.user) - custom_channel = utils.get(ctx.guild.channels, id=holo_user_ctx.customchannel) + custom_channel = ds_utils.get(ctx.guild.channels, id=holo_user_ctx.customchannel) if custom_channel is None: await ctx.respond( embed=Embed( @@ -124,7 +126,7 @@ class CustomChannels(commands.Cog): if holo_user_ctx.customchannel is not None: await ctx.defer() - custom_channel = utils.get( + custom_channel = ds_utils.get( ctx.guild.channels, id=holo_user_ctx.customchannel ) if custom_channel is None: