mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-05 13:56:48 +01:00
renamed variable
This commit is contained in:
1 file changed
+6
-6
+6
-6
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user