Le bot est gentil essai 4

This commit is contained in:
BFlow 2020-04-17 15:02:36 +02:00
parent 6f1a214eef
commit 682de524c1

View file

@ -324,13 +324,14 @@ def main():
for channel in bot.get_all_channels(): for channel in bot.get_all_channels():
if channel.name == "général": if channel.name == "général":
current_chan = channel current_chan = channel
elif channel.name == "Général":
for member in channel.members:
await member.edit(mute=False)
await current_chan.send('Le troll est dans la place !') await current_chan.send('Le troll est dans la place !')
ctx = await bot.get_context(current_chan.last_message) ctx = await bot.get_context(current_chan.last_message)
join = bot.get_command('join') join = bot.get_command('join')
await join.invoke(ctx) await join.invoke(ctx)
for channel in bot.get_all_channels():
if channel.name == "Général":
for member in channel.members:
await member.edit(mute=False)
@aiocron.crontab('50 9-23/1 * * *') @aiocron.crontab('50 9-23/1 * * *')
async def kron(): async def kron():