Add shutdown

This commit is contained in:
Will Bradley 2024-04-10 15:57:29 -07:00
parent 05074d33be
commit f44468e4b6
Signed by: will
GPG Key ID: 1159B930701263F3

View File

@ -8,6 +8,7 @@ import logging
from datetime import datetime, timezone from datetime import datetime, timezone
from discord import ui, Interaction from discord import ui, Interaction
import random import random
import sys
async def welcome_message(): async def welcome_message():
# Find the #welcome channel # Find the #welcome channel
@ -212,6 +213,12 @@ async def cmd_nine_nine(ctx):
response = random.choice(brooklyn_99_quotes) response = random.choice(brooklyn_99_quotes)
await ctx.send(response) 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 # @client.event
# async def on_message(message): # async def on_message(message):
# if message.author == client.user: # if message.author == client.user: