From 17d6a597a7be08a6f46c168d8242846d34625269 Mon Sep 17 00:00:00 2001 From: aikaterna Date: Tue, 28 May 2019 22:32:25 -0700 Subject: [PATCH] 3.1 changes --- away/away.py | 2 +- otherbot/otherbot.py | 2 +- trickortreat/trickortreat.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/away/away.py b/away/away.py index ecd49ea..5f176d1 100644 --- a/away/away.py +++ b/away/away.py @@ -132,7 +132,7 @@ class Away(BaseCog): for word in message.split(): match = re.search(r"<@!?([0-9]+)>", word) if match: - user = await self.bot.get_user_info(int(match.group(1))) + user = await self.bot.fetch_user(int(match.group(1))) message = re.sub(match.re, "@" + user.name, message) return message diff --git a/otherbot/otherbot.py b/otherbot/otherbot.py index 7f8e215..dda8bd7 100644 --- a/otherbot/otherbot.py +++ b/otherbot/otherbot.py @@ -61,7 +61,7 @@ class Otherbot(BaseCog): msg += "None." if not bot_user: for saved_bot_id in data["watching"]: - bot_user = await self.bot.get_user_info(saved_bot_id) + bot_user = await self.bot.fetch_user(saved_bot_id) if len(bot_user.name) > 16: bot_name = f"{bot_user.name:16}...#{bot_user.discriminator}" else: diff --git a/trickortreat/trickortreat.py b/trickortreat/trickortreat.py index a4be5f7..1c2d30b 100644 --- a/trickortreat/trickortreat.py +++ b/trickortreat/trickortreat.py @@ -196,7 +196,7 @@ class TrickOrTreat(BaseCog): if account[1]["eaten"] == 0: continue user_idx = i + 1 - user_obj = await self.bot.get_user_info(account[0]) + user_obj = await self.bot.fetch_user(account[0]) user_name = f"{user_obj.name}#{user_obj.discriminator}" if len(user_name) > 28: user_name = f"{user_obj.name[:19]}...#{user_obj.discriminator}"