aboutsummaryrefslogtreecommitdiff
path: root/cogs/logs.py
diff options
context:
space:
mode:
author0ceanlight <imahacubak@gmail.com>2020-06-06 22:33:52 +0000
committer0ceanlight <imahacubak@gmail.com>2020-06-06 22:33:52 +0000
commit9ce9c6014e1915e1581dcbad7fdfedda64e6f858 (patch)
tree84c88864f821e6f2b568f77abf979d7548b100d1 /cogs/logs.py
parent367e7109785c29fc79f681297f7cb2a8ced2421b (diff)
parent0f520398aaf05fe6c5f3626b23a8d2453bfa9c10 (diff)
downloadsteve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar.gz
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar.bz2
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar.lz
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar.xz
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.tar.zst
steve-bot-9ce9c6014e1915e1581dcbad7fdfedda64e6f858.zip
Merge branch 'master' of https://github.com/AnInternetTroll/mcbeDiscordBot
Diffstat (limited to 'cogs/logs.py')
-rwxr-xr-x[-rw-r--r--]cogs/logs.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/cogs/logs.py b/cogs/logs.py
index cd55c36..ea3870a 100644..100755
--- a/cogs/logs.py
+++ b/cogs/logs.py
@@ -8,6 +8,8 @@ class Logs(commands.Cog):
@commands.Cog.listener()
async def on_message_delete(self, message):
+ if message.guild.id != 574267523869179904:
+ return
channel = self.bot.get_channel(718187032869994686)
embed = discord.Embed(
title='Deleted Message',
@@ -17,22 +19,28 @@ class Logs(commands.Cog):
embed.add_field(
name='User', value=message.author.mention, inline=True)
embed.add_field(
- name='Channel', value=message.channel.name, inline=True)
+ name='Channel', value=message.channel.mention, inline=True)
embed.add_field(name='Message', value=message.content, inline=False)
await channel.send(embed=embed)
@commands.Cog.listener()
async def on_message_edit(self, before, after):
+ if after.guild.id != 574267523869179904:
+ return
channel = self.bot.get_channel(718187032869994686)
+ if before.author.color.value == 0:
+ color = 16777210
+ else:
+ color = before.author.color
embed = discord.Embed(
title='Edited Message',
- color=before.author.color,
+ color=color,
timestamp=after.edited_at
)
embed.add_field(
name='User', value=before.author.mention, inline=True)
embed.add_field(
- name='Channel', value=before.channel.name, inline=True)
+ name='Channel', value=before.channel.mention, inline=True)
embed.add_field(name='Original Message',
value=before.content, inline=False)
embed.add_field(name='New Message', value=after.content, inline=False)