From 1375d96f24de3ba46ff496df14b9ee1952442144 Mon Sep 17 00:00:00 2001 From: Ske Date: Fri, 30 Nov 2018 22:01:33 +0100 Subject: [PATCH] Fix message lookup. Closes #32. --- src/pluralkit/bot/commands/message_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pluralkit/bot/commands/message_commands.py b/src/pluralkit/bot/commands/message_commands.py index 7f7c20f3..d5ceebf6 100644 --- a/src/pluralkit/bot/commands/message_commands.py +++ b/src/pluralkit/bot/commands/message_commands.py @@ -5,10 +5,10 @@ logger = logging.getLogger("pluralkit.commands") async def get_message_contents(client: discord.Client, channel_id: int, message_id: int): - channel = client.get_channel(str(channel_id)) + channel = client.get_channel(channel_id) if channel: try: - original_message = await client.get_channel(channel).get_message(message_id) + original_message = await channel.get_message(message_id) return original_message.content or None except (discord.errors.Forbidden, discord.errors.NotFound): pass