diff --git a/src/pluralkit/bot/channel_logger.py b/src/pluralkit/bot/channel_logger.py index 94e1dd1e..63386fa2 100644 --- a/src/pluralkit/bot/channel_logger.py +++ b/src/pluralkit/bot/channel_logger.py @@ -32,9 +32,9 @@ class ChannelLogger: return self.client.get_channel(str(log_channel)) - async def send_to_log_channel(self, log_channel: discord.Channel, embed: discord.Embed): + async def send_to_log_channel(self, log_channel: discord.Channel, embed: discord.Embed, text: str = None): try: - await self.client.send_message(log_channel, embed=embed) + await self.client.send_message(log_channel, embed=embed, content=text) except discord.Forbidden: # TODO: spew big error self.logger.warning( @@ -75,9 +75,7 @@ class ChannelLogger: embed.set_thumbnail(url=message_image) message_link = "https://discordapp.com/channels/{}/{}/{}".format(server_id, channel_id, message_id) - embed.author.url = message_link - - await self.send_to_log_channel(log_channel, embed) + await self.send_to_log_channel(log_channel, embed, message_link) async def log_message_deleted(self, conn, server_id: str, diff --git a/src/pluralkit/bot/commands/__init__.py b/src/pluralkit/bot/commands/__init__.py index 9cb35203..4954490a 100644 --- a/src/pluralkit/bot/commands/__init__.py +++ b/src/pluralkit/bot/commands/__init__.py @@ -1,15 +1,12 @@ -import os - import discord import logging import re -import traceback from typing import Tuple, Optional, Union from pluralkit import db -from pluralkit.system import System -from pluralkit.member import Member from pluralkit.bot import embeds, utils +from pluralkit.member import Member +from pluralkit.system import System logger = logging.getLogger("pluralkit.bot.commands")