fix(shard): 🐛 Fix not found error in get_or_fetch_channel().
This commit is contained in:
+7
-7
@@ -123,7 +123,11 @@ class Payphone(commands.AutoShardedBot):
|
||||
channel = self.get_channel(channel_id)
|
||||
|
||||
if channel is None:
|
||||
return await self.fetch_channel(channel_id)
|
||||
try:
|
||||
return await self.fetch_channel(channel_id)
|
||||
|
||||
except discord.errors.NotFound:
|
||||
return None
|
||||
|
||||
return channel
|
||||
|
||||
@@ -221,14 +225,10 @@ class Payphone(commands.AutoShardedBot):
|
||||
)
|
||||
|
||||
for mention in message.role_mentions:
|
||||
content = content.replace(
|
||||
f"<@{mention.id}>", f"@**{mention.name}**"
|
||||
)
|
||||
content = content.replace(f"<@{mention.id}>", f"@**{mention.name}**")
|
||||
|
||||
for mention in message.channel_mentions:
|
||||
content = content.replace(
|
||||
f"<@{mention.id}>", f"#**{mention.name}**"
|
||||
)
|
||||
content = content.replace(f"<@{mention.id}>", f"#**{mention.name}**")
|
||||
|
||||
return content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user