fulvia/modules/announce.py
2020-01-07 18:58:19 -05:00

20 lines
509 B
Python
Executable File

#!/usr/bin/env python3
"""
Sends a message to all channels the bot is currently in.
"""
from module import commands, example, require_admin
@require_admin
@commands('announce')
@example('.announce Some important message here')
def announce(bot, trigger):
"""
Send an announcement to all channels the bot is in.
"""
if len(trigger.args) < 2:
return bot.reply("What message?")
for channel in bot.channels.keys():
bot.msg(channel, f"[ANNOUNCEMENT] {trigger.args[1]}")
bot.reply('Announce complete.')