countdown-bot

A Discord bot that runs countdown games and generates analytics
git clone https://git.ashermorgan.net/countdown-bot/
Log | Files | Refs | README

commit 3d157e4fd161ca66b8374da22686e11873cf4134
parent 9641948447da1b60db2f64b14a7092c3ccaac1f3
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date:   Tue, 26 Jan 2021 13:07:18 -0800

Implement error messages.

Diffstat:
Mbot.py | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/bot.py b/bot.py @@ -317,6 +317,8 @@ async def on_ready(): # Print status print(f"Loaded messages from {bot.get_channel(channel)}") + + @bot.event async def on_message(obj): if (obj.channel.id in channels and obj.author.name != "countdown-bot"): @@ -328,6 +330,12 @@ async def on_message(obj): +@bot.event +async def on_command_error(ctx, error): + await ctx.send(f"Error: {error}") + + + @bot.command(aliases=["c"]) async def contributors(ctx): """