diff --git a/announce.py b/announce.py index 58733890a2..ae99aec944 100644 --- a/announce.py +++ b/announce.py @@ -5,15 +5,16 @@ Licensed under the Eiffel Forum License 2. """ -def announce(willie, trigger): +from willie.module import command, example + +@command('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: - willie.reply('Sorry, I can\'t let you do that') + bot.reply('Sorry, I can\'t let you do that') return - print willie.channels - for channel in willie.channels: - willie.msg(channel, '[ANNOUNCMENT] %s' % trigger.group(2)) -announce.commands = ['announce'] -announce.example = '.announce Some important message here' + for channel in bot.channels: + bot.msg(channel, '[ANNOUNCMENT] %s' % trigger.group(2))