aboutsummaryrefslogtreecommitdiff
path: root/bot.py
diff options
context:
space:
mode:
authorThomas Voss <57815710+Mango0x45@users.noreply.github.com>2020-06-04 20:59:52 +0000
committerGitHub <noreply@github.com>2020-06-04 20:59:52 +0000
commitabe3606c9358d56b4ce08ac50665ad84b0078b7f (patch)
treea7a806b8f50f5e4e55f02678bf894c5c10c74928 /bot.py
parentffe1f1df78d13f429f108f158a92357857cce93e (diff)
downloadsteve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar.gz
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar.bz2
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar.lz
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar.xz
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.tar.zst
steve-bot-abe3606c9358d56b4ce08ac50665ad84b0078b7f.zip
Added on_message_delete()
Diffstat (limited to 'bot.py')
-rw-r--r--bot.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/bot.py b/bot.py
index 7a1990c..4f87530 100644
--- a/bot.py
+++ b/bot.py
@@ -54,11 +54,23 @@ class BedrockBot(commands.Bot):
return
await self.process_commands(message)
- command = message.content.split()[0]
+ try:
+ command = message.content.split()[0]
+ except IndexError:
+ pass
if command in self.custom_commands:
await message.channel.send(self.custom_commands[command])
return
+
+ async def on_message_delete(self, message):
+ channel = self.get_channel(718187032869994686)
+ embed = discord.Embed(
+ description=message.content,
+ color=message.author.color,
+ timestamp=message.created_at
+ )
+ await channel.send(embed=embed)
def run(self):
- super().run(config.token, reconnect=True) \ No newline at end of file
+ super().run(config.token, reconnect=True)