From f44468e4b62cac45d32ba0e79ce879327411acc3 Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 10 Apr 2024 15:57:29 -0700 Subject: [PATCH] Add shutdown --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 40e7423..8af0460 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,7 @@ import logging from datetime import datetime, timezone from discord import ui, Interaction import random +import sys async def welcome_message(): # Find the #welcome channel @@ -212,6 +213,12 @@ async def cmd_nine_nine(ctx): response = random.choice(brooklyn_99_quotes) await ctx.send(response) +@client.command(name='shutdown') +async def cmd_shutdown(ctx): + """Shutdown the bot""" + await ctx.send("Shutting down!") + sys.exit() + # @client.event # async def on_message(message): # if message.author == client.user: