fix(main): fixed pylint warning
This commit is contained in:
parent
e7f569a9b0
commit
2d39b773f4
1 changed files with 7 additions and 7 deletions
14
main.py
14
main.py
|
@ -57,21 +57,21 @@ class Client(commands.CommandsClient):
|
||||||
else:
|
else:
|
||||||
print(f"{message.author.name}#{message.author.discriminator} ({message.author.id}): {message.content}\n ⤷ Deleted from Direct Messages\n Message ID: {message.id}")
|
print(f"{message.author.name}#{message.author.discriminator} ({message.author.id}): {message.content}\n ⤷ Deleted from Direct Messages\n Message ID: {message.id}")
|
||||||
|
|
||||||
async def on_message_update(self, before: revolt.Message, message: revolt.Message):
|
async def on_message_update(self, before: revolt.Message, after: revolt.Message):
|
||||||
if isinstance(message.author, revolt.Member):
|
if isinstance(after.author, revolt.Member):
|
||||||
if message.author.bot is True:
|
if after.author.bot is True:
|
||||||
return
|
return
|
||||||
message_link = f"{app_url}/server/{message.server.id}/channel/{message.channel.id}/message/{message.id}"
|
message_link = f"{app_url}/server/{after.server.id}/channel/{after.channel.id}/message/{after.id}"
|
||||||
embeds = [CustomEmbed(description=f"## Message Edited in {message.channel.mention}\n**Author:** {message.author.name}#{message.author.discriminator} ({message.author.id})\n**Message ID:** [{message.id}]({message_link})", colour="#5d82d1"), CustomEmbed(title="Old Content", description=before.content, colour="#5d82d1"), CustomEmbed(title="New Content", description=message.content, colour="#5d82d1")]
|
embeds = [CustomEmbed(description=f"## Message Edited in {after.channel.mention}\n**Author:** {after.author.name}#{after.author.discriminator} ({after.author.id})\n**Message ID:** [{after.id}]({message_link})", colour="#5d82d1"), CustomEmbed(title="Old Content", description=before.content, colour="#5d82d1"), CustomEmbed(title="New Content", description=after.content, colour="#5d82d1")]
|
||||||
channel = self.get_channel(message_logging_channel)
|
channel = self.get_channel(message_logging_channel)
|
||||||
try:
|
try:
|
||||||
await channel.send(embed=embeds[0])
|
await channel.send(embed=embeds[0])
|
||||||
await channel.send(embed=embeds[1])
|
await channel.send(embed=embeds[1])
|
||||||
await channel.send(embed=embeds[2])
|
await channel.send(embed=embeds[2])
|
||||||
except LookupError:
|
except LookupError:
|
||||||
print("Message logging channel not found for server ID: " + message.server.id)
|
print("Message logging channel not found for server ID: " + after.server.id)
|
||||||
else:
|
else:
|
||||||
print(f"{message.author.name}#{message.author.discriminator} ({message.author.id}): {before.content}\n ⤷ Edited in Direct Messages\n New Content: {message.content}")
|
print(f"{after.author.name}#{after.author.discriminator} ({after.author.id}): {before.content}\n ⤷ Edited in Direct Messages\n New Content: {after.content}")
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def ping(self, ctx: commands.Context):
|
async def ping(self, ctx: commands.Context):
|
||||||
|
|
Loading…
Reference in a new issue