From 43c95cd2b979d50adcca0a88c6874b96de08cfb7 Mon Sep 17 00:00:00 2001 From: LBlend Date: Wed, 24 Mar 2021 03:35:06 +0100 Subject: [PATCH] renamed variable --- src/cogs/mod.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cogs/mod.py b/src/cogs/mod.py index ed033e6..dec5566 100644 --- a/src/cogs/mod.py +++ b/src/cogs/mod.py @@ -15,7 +15,7 @@ class Mod(commands.Cog): @commands.has_permissions(ban_members=True) @commands.guild_only() @commands.command() - async def hackban(self, ctx, brukerid, *, melding=None): + async def hackban(self, ctx, brukerid, *, begrunnelese=None): """ Bannlys en bruker før de i det hele tatt har blitt med i serveren """ @@ -33,15 +33,15 @@ class Mod(commands.Cog): embed = embed_templates.error_warning(ctx, text='Denne brukeren er allerede bannlyst fra serveren!') return await ctx.send(embed=embed) - if melding is None: - melding = 'Ingen grunn angitt' + if begrunnelese is None: + begrunnelese = 'Ingen grunn angitt' date = datetime.now().strftime('%d. %b. %Y - %H:%M') try: await ctx.guild.ban( user, - reason=f'{date} | {ctx.author.name}#{ctx.author.discriminator} ({ctx.author.id}): {melding}' + reason=f'{date} | {ctx.author.name}#{ctx.author.discriminator} ({ctx.author.id}): {begrunnelese}' ) except discord.errors.NotFound: embed = embed_templates.error_warning(ctx, text='Bruker finnes ikke!') @@ -50,8 +50,8 @@ class Mod(commands.Cog): user_object = self.bot.get_user(brukerid) embed = discord.Embed(color=discord.Color.red(), title='🔨 Bruker utestengt!') - if melding != 'Ingen grunn angitt': - embed.description = f'`{melding}`' + if begrunnelese != 'Ingen grunn angitt': + embed.description = f'`{begrunnelese}`' if user_object: user = user_object embed.set_thumbnail(url=user.avatar_url)