2018-03-16 03:13:43 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
"""
|
|
|
|
Sends a message to all channels the bot is currently in.
|
|
|
|
"""
|
|
|
|
from module import commands, example
|
|
|
|
|
|
|
|
|
|
|
|
@commands('announce')
|
|
|
|
@example('.announce Some important message here')
|
|
|
|
def announce(bot, trigger):
|
|
|
|
"""
|
|
|
|
Send an announcement to all channels the bot is in.
|
|
|
|
"""
|
|
|
|
if not trigger.admin:
|
|
|
|
bot.reply("Sorry, I can't let you do that")
|
|
|
|
return
|
2019-10-08 11:45:21 -04:00
|
|
|
for channel in bot.channels.keys():
|
2018-03-16 03:13:43 -04:00
|
|
|
bot.msg(channel, f"[ANNOUNCEMENT] {trigger.group(2)}")
|
|
|
|
bot.reply('Announce complete.')
|