diff options
| author | 2018-04-12 10:25:06 +0100 | |
|---|---|---|
| committer | 2018-04-12 10:25:06 +0100 | |
| commit | c7af4ac086831c26c500ebf6fc4c5a8ac575baa4 (patch) | |
| tree | 80b041156b88521e56fd75f6b480bf31de6bb3cf | |
| parent | Merge remote-tracking branch 'origin/master' (diff) | |
Echo/embed commands for staff testing
| -rw-r--r-- | bot/cogs/bot.py | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 3b2ff0926..d3c4ba39b 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -9,8 +9,9 @@ from discord.ext.commands import AutoShardedBot, Context, command, group from dulwich.repo import Repo from bot.constants import ( - BOT_CHANNEL, DEVTEST_CHANNEL, HELP1_CHANNEL, - HELP2_CHANNEL, HELP3_CHANNEL, PYTHON_CHANNEL, + ADMIN_ROLE, BOT_CHANNEL, DEVTEST_CHANNEL, + HELP1_CHANNEL, HELP2_CHANNEL, HELP3_CHANNEL, + MODERATOR_ROLE, OWNER_ROLE, PYTHON_CHANNEL, PYTHON_GUILD, VERIFIED_ROLE ) from bot.decorators import with_role @@ -80,6 +81,25 @@ class Bot: await ctx.invoke(self.info) + @command(name="echo") + @with_role(OWNER_ROLE, ADMIN_ROLE, MODERATOR_ROLE) + async def echo_command(self, ctx: Context, text: str): + """ + Send the input verbatim to the current channel + """ + + await ctx.send(text) + + @command(name="embed") + @with_role(OWNER_ROLE, ADMIN_ROLE, MODERATOR_ROLE) + async def embed_command(self, ctx: Context, text: str): + """ + Send the input within an embed to the current channel + """ + + embed = Embed(description=text) + await ctx.send(embed=embed) + def codeblock_stripping(self, msg: str): """ Strip msg in order to find Python code. |