3.1 changes

This commit is contained in:
aikaterna
2019-05-28 22:32:25 -07:00
parent 831740f18c
commit 17d6a597a7
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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}"