Compare commits

...

2 commits

Author SHA1 Message Date
e753423957
remove whitespace
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-29 23:04:57 +02:00
ee561c5356
reduce prune days to 7 2023-05-29 23:04:45 +02:00

12
bot.py
View file

@ -101,7 +101,7 @@ class Confirm(discord.ui.View):
@bot.slash_command(guild_ids=[261575556708040705]) @bot.slash_command(guild_ids=[261575556708040705])
@commands.has_role(member_role) @commands.has_role(member_role)
async def roll(ctx, async def roll(ctx,
dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"), dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"),
): ):
"""Rolle einen oder mehrere Würfel""" """Rolle einen oder mehrere Würfel"""
@ -134,7 +134,7 @@ async def roll(ctx,
@bot.slash_command(guild_ids=[261575556708040705]) @bot.slash_command(guild_ids=[261575556708040705])
@commands.has_role(gm_role) @commands.has_role(gm_role)
async def gmroll(ctx, async def gmroll(ctx,
dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"), dice: Option(str, "Würfel den/die du werfen willst. z.B. W20, 3d6", default="W20"),
): ):
"""Rolle einen oder mehrere Würfel verdeckt""" """Rolle einen oder mehrere Würfel verdeckt"""
@ -178,7 +178,7 @@ class MyModal(Modal):
original_message = await interaction.channel.fetch_message(self.message_id) original_message = await interaction.channel.fetch_message(self.message_id)
for x in list(emojitext): for x in list(emojitext):
await original_message.add_reaction(alphabet[x]) await original_message.add_reaction(alphabet[x])
@bot.message_command(name="Emoji Text", guild_ids=[261575556708040705]) @bot.message_command(name="Emoji Text", guild_ids=[261575556708040705])
@commands.has_role(member_role) @commands.has_role(member_role)
@ -414,7 +414,7 @@ async def hiebe(ctx, *, arg):
await user.create_dm() await user.create_dm()
await user.dm_channel.send("HIEBE :punch: von {}".format(ctx.author.display_name)) await user.dm_channel.send("HIEBE :punch: von {}".format(ctx.author.display_name))
@bot.command(help="kickt Member ohne Rolle, die 30 Tage nicht online waren", usage="") @bot.command(help="kickt Member ohne Rolle, die 7 Tage nicht online waren", usage="")
@is_admin() @is_admin()
async def prune(ctx): async def prune(ctx):
await ctx.message.delete() await ctx.message.delete()
@ -427,8 +427,8 @@ async def prune(ctx):
await ctx.send(content="Zeit ausgelaufen", delete_after=5.0) await ctx.send(content="Zeit ausgelaufen", delete_after=5.0)
elif view.value: elif view.value:
await question.delete() await question.delete()
deleted = await ctx.guild.prune_members(days=30) deleted = await ctx.guild.prune_members(days=7)
await ctx.send(content='Ich habe {} Leichen beseitigt.'.format(deleted), delete_after=5.0) await ctx.send(content='Ich habe {} Leiche(n) beseitigt.'.format(deleted), delete_after=5.0)
else: else:
await question.delete() await question.delete()