def announce(self, announcement):
update = {}
# Adhere to schedule.
- if announcement['asap'] == 'true':
+ if bot.parse_boolean(announcement['asap']):
log.info('Announcement {} was requested ASAP'.format(announcement['id']))
announcement['probability'] = 1.0
update['asap'] = 'false'
digest = announcement['digest']
# Always post private messages. Try not to spam public announcements.
- if not private:
+ if not private and not bot.parse_boolean(announcement['asap']):
cutoff = datetime.datetime.utcnow() - datetime.timedelta(0, announcement['interval'])
result = yield from client.logs_from(channel, after = cutoff)
logs = list(result)