fix war channels logic
This commit is contained in:
1 parent
c5c2288b60
commit
ce1385ea91
1 file changed
+5
@@ -344,12 +344,17 @@ class WarMonitor(commands.Cog):
|
||||
m = await channel.send(embeds=[war_card], view=button)
|
||||
await self.calc_inrange(war.att_id, channel)
|
||||
|
||||
# adding member to the channel
|
||||
guild = await self.bot.fetch_guild(GUILD)
|
||||
member = discord.utils.get(guild.members, name=defender.discord)
|
||||
if member:
|
||||
await channel.set_permissions(
|
||||
member, read_messages=True, send_messages=True, view_channel=True
|
||||
)
|
||||
else:
|
||||
await channel.send(
|
||||
f"> couldn't add {defender.leader_name} to the channel, ask them to link their discord in nation settings."
|
||||
)
|
||||
await m.pin()
|
||||
|
||||
@log_errors
|
||||
|
||||
Reference in new issue
Block a user