From 47d5ab9375e6c477f8885b618b14fc77253817b5 Mon Sep 17 00:00:00 2001 From: Appelsiini1 <37345715+Appelsiini1@users.noreply.github.com> Date: Sun, 23 May 2021 23:19:01 +0300 Subject: [PATCH 1/2] Consolidate author, git and version commands Replace with a single "info" command --- constants.py | 4 +--- main.py | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/constants.py b/constants.py index 1c6dfe9..c9d1d49 100644 --- a/constants.py +++ b/constants.py @@ -17,8 +17,6 @@ def get_tokens(): # Functional constants PREFIX = "!c " -AUTHOR = "This bot is maintained by Appelsiini1" -GIT = "Source code for this bot can be found at https://github.com/Appelsiini1/CoraBot" DB_F = os.path.join( os.path.dirname(os.path.realpath(__file__)), "Databases", "database.db" ) @@ -66,4 +64,4 @@ def start(self): # Version number -VERSION = "v1.14.8" +VERSION = "v1.14.9" diff --git a/main.py b/main.py index bad481f..ce8cfc7 100644 --- a/main.py +++ b/main.py @@ -103,12 +103,18 @@ async def on_message(message): await message.channel.send("Hello!") elif cmd == "help": await commands.cmds(message) - elif cmd == "author": - await message.channel.send(AUTHOR) - elif cmd == "git": - await message.channel.send(GIT) - elif cmd == "version": - await message.channel.send(f"CoraBot `{VERSION}`") + elif cmd in ["author", "git", "version"]: + await message.channel.send("This command has been depricated and will be removed soon. Use `!c info` instead.") + elif cmd == "info": + emb = discord.Embed() + emb.title = "CoraBot Info" + emb.description = f"**Created by** Appelsiini1\nThe source code & development info for this bot can be found at https://github.com/Appelsiini1/CoraBot\n\nVersion: {VERSION}" + emb.color = common.get_hex_colour(cora_blonde=True) + + try: + message.channel.send(embed=emb) + except discord.errors.Forbidden: + common.forbiddenErrorHandler(message) elif cmd == "inspire": await quote.get_quote(message) elif cmd == "insult": From 60c1fc9fe2c915955c939c6b415170fcf93d9007 Mon Sep 17 00:00:00 2001 From: Appelsiini1 <37345715+Appelsiini1@users.noreply.github.com> Date: Sun, 23 May 2021 23:21:53 +0300 Subject: [PATCH 2/2] Remove git, author and version commands from command list --- modules/commands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/commands.py b/modules/commands.py index 4e61cb6..bc0ab65 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -6,9 +6,7 @@ async def cmds(message): cmd_list = """`hi` (alias: `hello`) `help` -`author` -`git` -`version` +`info` `inspire` `insult [user]` `f` (alias: `F`)