return
text = m.group(1)
args = shlex.split(text)
+ command = args[0].lower()
if len(args) == 1:
- if args[0] == 'list':
+ if command == 'list':
yield from list_announcements(message)
return
else:
yield from say(message.channel, 'yelp!')
return
- if args[0] == 'show':
+ if command == 'show':
yield from show_announcement(message, args[1])
- elif args[0] == 'delete':
+ elif command == 'delete':
yield from delete_announcement(message, args[1])
- elif args[0] == 'asap':
+ elif command == 'asap':
yield from schedule_announcement(message, args[1], asap = True)
- elif args[0] == 'pause':
+ elif command == 'pause':
yield from schedule_announcement(message, args[1], pause = True)
- elif args[0] == 'resume':
+ elif command == 'resume':
yield from schedule_announcement(message, args[1], pause = False)
- elif args[0] == 'create':
+ elif command == 'create':
yield from create_announcement(message, text)
@asyncio.coroutine