Merge branch 'main' of github.com:UiO-Gaming/uiogaming-bot into main

This commit is contained in:
LBlend committed 2021-03-26 17:04:25 +01:00
commit 87302514e6
2 files changed
+11 -6

No files matched your search

+5
View File
@@ -18,10 +18,15 @@ class FunReplies(commands.Cog):
await message.channel.send('Jeg vet hvem som drepte Olof Palme 👀')
# The Ultimate spaghetti
<<<<<<< HEAD
elif re.match(r'(\W|\s)*lesgo{1}(\s|\W)*', message.clean_content.lower()) or \
message.clean_content.lower() == 'lesgo':
await message.channel.send('https://cdn.discordapp.com/attachments/750052141346979850/' +
'824764933513281596/3xhpwbakz2361.png')
=======
elif re.match(r'(\W|\s)*lesgo{1}(\s|\W)*', message.clean_content.lower()) or message.clean_content.lower() == 'lesgo':
await message.channel.send('https://cdn.discordapp.com/attachments/750052141346979850/824764933513281596/3xhpwbakz2361.png')
>>>>>>> 0145bbfd78140aa14e79be6d0aee2231c011b15f
def setup(bot):
+6 -6
View File
@@ -14,7 +14,7 @@ class Mod(commands.Cog):
@commands.has_permissions(ban_members=True)
@commands.guild_only()
@commands.command()
async def hackban(self, ctx, brukerid, *, begrunnelese=None):
async def hackban(self, ctx, brukerid, *, begrunnelse=None):
"""
Bannlys en bruker før de i det hele tatt har blitt med i serveren
"""
@@ -32,15 +32,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 begrunnelese is None:
begrunnelese = 'Ingen grunn angitt'
if begrunnelse is None:
begrunnelse = '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}): {begrunnelese}'
reason=f'{date} | {ctx.author.name}#{ctx.author.discriminator} ({ctx.author.id}): {begrunnelse}'
)
except discord.errors.NotFound:
embed = embed_templates.error_warning(ctx, text='Bruker finnes ikke!')
@@ -49,8 +49,8 @@ class Mod(commands.Cog):
user_object = self.bot.get_user(brukerid)
embed = discord.Embed(color=discord.Color.red(), title='🔨 Bruker utestengt!')
if begrunnelese != 'Ingen grunn angitt':
embed.description = f'`{begrunnelese}`'
if begrunnelse != 'Ingen grunn angitt':
embed.description = f'`{begrunnelse}`'
if user_object:
user = user_object
embed.set_thumbnail(url=user.avatar_url)