Add Info Cog #11

Merged
cswimr merged 19 commits from info into master 2023-07-01 11:36:31 -04:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 065eb8e681 - Show all commits

View file

@ -5,4 +5,5 @@
missing-class-docstring, missing-class-docstring,
line-too-long, line-too-long,
too-many-arguments, too-many-arguments,
too-many-branches too-many-branches,
superfluous-parens

View file

@ -33,14 +33,15 @@ class Client(commands.CommandsClient):
embed = [CustomEmbed(description=f"## Message Deleted in {message.channel.mention}\n**Author:** {message.author.name}#{message.author.discriminator} ({message.author.id})\n**Content:** {message.content}", colour="#5d82d1"), CustomEmbed(description=f"## Message Deleted in {message.channel.mention}\n**Author:** {message.author.name}#{message.author.discriminator} ({message.author.id})\n**Content:** {truncated_content}\n\n*Message content is over the character limit.*", colour="#5d82d1")] embed = [CustomEmbed(description=f"## Message Deleted in {message.channel.mention}\n**Author:** {message.author.name}#{message.author.discriminator} ({message.author.id})\n**Content:** {message.content}", colour="#5d82d1"), CustomEmbed(description=f"## Message Deleted in {message.channel.mention}\n**Author:** {message.author.name}#{message.author.discriminator} ({message.author.id})\n**Content:** {truncated_content}\n\n*Message content is over the character limit.*", colour="#5d82d1")]
embed[0].set_footer(f"Message ID: {message.id}") embed[0].set_footer(f"Message ID: {message.id}")
embed[1].set_footer(f"Message ID: {message.id}") embed[1].set_footer(f"Message ID: {message.id}")
channel = self.get_channel(message_logging_channel)
try: try:
try: try:
await self.get_channel(message_logging_channel).send(embed=embed[0]) await channel.send(embed=embed[0])
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: " + message.server.id)
except(revolt.errors.HTTPError): except(revolt.errors.HTTPError):
try: try:
await self.get_channel(message_logging_channel).send(embed=embed[1]) await channel.send(embed=embed[1])
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: " + message.server.id)
else: else: