Converted misc functionality to slash commands

This commit is contained in:
NikolajDanger
2021-04-06 11:02:12 +02:00
parent b3b81b2b50
commit 682a20f62d
5 changed files with 96 additions and 82 deletions

View File

@ -36,6 +36,20 @@ class Gwendolyn(commands.Bot):
def log(self, messages, channel : str = "", level : int = 20):
logThis(messages, channel, level)
async def stop(self, ctx):
if f"#{ctx.author.id}" in self.options.admins:
await ctx.send("Pulling git repo and restarting...")
await self.change_presence(status = discord.Status.offline)
self.databaseFuncs.stopServer()
self.log("Logging out", level = 25)
await self.logout()
else:
self.log(f"{ctx.author.display_name} tried to stop me! (error code 201)",str(ctx.channel_id))
await ctx.send(f"I don't think I will, {ctx.author.display_name} (error code 201)")
if __name__ == "__main__":