Skip to content
This repository was archived by the owner on Oct 18, 2020. It is now read-only.

Commit bbb8afb

Browse files
committed
open channel after announcement
1 parent 7b8adc8 commit bbb8afb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,6 @@ async def annonce_inscription():
447447
inscriptions_channel = bot.get_channel(inscriptions_channel_id)
448448
inscriptions_role = inscriptions_channel.guild.get_role(gamelist[tournoi['game']]['role']) if tournoi["restrict_to_role"] else inscriptions_channel.guild.default_role
449449

450-
if tournoi['reaction_mode']:
451-
await inscriptions_channel.set_permissions(inscriptions_role, read_messages=True, send_messages=False, add_reactions=False)
452-
else:
453-
await inscriptions_channel.set_permissions(inscriptions_role, read_messages=True, send_messages=True, add_reactions=False)
454-
await inscriptions_channel.edit(slowmode_delay=60)
455-
456450
await inscriptions_channel.purge(limit=None)
457451

458452
annonce_msg = await inscriptions_channel.send(annonce)
@@ -464,6 +458,12 @@ async def annonce_inscription():
464458

465459
await annonce_msg.pin()
466460

461+
if tournoi['reaction_mode']:
462+
await inscriptions_channel.set_permissions(inscriptions_role, read_messages=True, send_messages=False, add_reactions=False)
463+
else:
464+
await inscriptions_channel.set_permissions(inscriptions_role, read_messages=True, send_messages=True, add_reactions=False)
465+
await inscriptions_channel.edit(slowmode_delay=60)
466+
467467
await bot.get_channel(annonce_channel_id).send(f"{server_logo} Inscriptions pour le **{tournoi['name']}** ouvertes dans <#{inscriptions_channel_id}> ! Consultez-y les messages épinglés. <@&{gamelist[tournoi['game']]['role']}>\n"
468468
f":calendar_spiral: Ce tournoi aura lieu le **{format_date(tournoi['début_tournoi'], format='full', locale=language)} à {format_time(tournoi['début_tournoi'], format='short', locale=language)}**.")
469469

0 commit comments

Comments
 (0)