From 26b0a8d8935b91221003a3cd1f300bd4ec3d5e75 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 7 Oct 2019 22:37:49 -0700 Subject: [PATCH] get_message to fetch_message --- discordbot/titanembeds/bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/discordbot/titanembeds/bot.py b/discordbot/titanembeds/bot.py index a03c147..a44dc38 100644 --- a/discordbot/titanembeds/bot.py +++ b/discordbot/titanembeds/bot.py @@ -194,7 +194,7 @@ class Titan(discord.AutoShardedClient): channel = self.get_channel(int(data["channel_id"])) me = channel.guild.get_member(self.user.id) if channel.permissions_for(me).read_messages: - message = await channel.get_message(int(message_id)) + message = await channel.fetch_message(int(message_id)) await self.on_message_edit(None, message) async def on_raw_message_delete(self, payload): @@ -228,7 +228,7 @@ class Titan(discord.AutoShardedClient): channel = self.get_channel(payload.channel_id) me = channel.guild.get_member(self.user.id) if channel.permissions_for(me).read_messages: - message = await channel.get_message(message_id) + message = await channel.fetch_message(message_id) if len(message.reactions): await self.on_reaction_add(message.reactions[0], None) @@ -240,7 +240,7 @@ class Titan(discord.AutoShardedClient): channel = self.get_channel(payload.channel_id) me = channel.guild.get_member(self.user.id) if channel.permissions_for(me).read_messages: - message = await channel.get_message(message_id) + message = await channel.fetch_message(message_id) message._add_reaction({"me": payload.user_id == self.user.id}, emoji, payload.user_id) reaction = message._remove_reaction({}, emoji, payload.user_id) await self.on_reaction_remove(reaction, None) @@ -251,7 +251,7 @@ class Titan(discord.AutoShardedClient): channel = self.get_channel(payload.channel_id) me = channel.guild.get_member(self.user.id) if channel.permissions_for(me).read_messages: - message = await channel.get_message(message_id) + message = await channel.fetch_message(message_id) await self.on_reaction_clear(message, []) async def on_socket_response(self, msg):