3.1 changes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user