Use or instead of two isinstance calls.
This commit is contained in:
+1
-1
@@ -346,7 +346,7 @@ async def send_highscore_message(session: Session, guild: nextcord.Guild, group:
|
|||||||
agon_logger.error("Channel id %s in guild %s does not exist.", group.channel_id, guild.id)
|
agon_logger.error("Channel id %s in guild %s does not exist.", group.channel_id, guild.id)
|
||||||
return
|
return
|
||||||
|
|
||||||
if not isinstance(channel, nextcord.TextChannel) or not isinstance(channel, nextcord.Thread):
|
if not isinstance(channel, nextcord.TextChannel | nextcord.Thread):
|
||||||
agon_logger.error(
|
agon_logger.error(
|
||||||
"Channel id %s in guild %s is does not correspond to a TextChannel or Thread.", channel.id, channel.guild.id
|
"Channel id %s in guild %s is does not correspond to a TextChannel or Thread.", channel.id, channel.guild.id
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user