Add command to close the bot
This commit is contained in:
parent
ca24cb4b93
commit
1816e38db6
1 changed files with 10 additions and 0 deletions
10
matchy.py
10
matchy.py
|
@ -47,6 +47,16 @@ async def sync(ctx: commands.Context):
|
||||||
await msg.edit(content="Done!")
|
await msg.edit(content="Done!")
|
||||||
|
|
||||||
|
|
||||||
|
@bot.command()
|
||||||
|
@commands.dm_only()
|
||||||
|
@commands.check(lambda ctx: ctx.message.author.id in config.OWNERS)
|
||||||
|
async def close(ctx: commands.Context):
|
||||||
|
"""Handle restart command"""
|
||||||
|
await ctx.reply("Closing bot...", ephemeral=True)
|
||||||
|
logger.info("Closing down the bot")
|
||||||
|
await bot.close()
|
||||||
|
|
||||||
|
|
||||||
@bot.tree.command(description="Match up matchees")
|
@bot.tree.command(description="Match up matchees")
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@app_commands.describe(group_min="Minimum matchees per match (defaults to 3)",
|
@app_commands.describe(group_min="Minimum matchees per match (defaults to 3)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue