from distbot.common.config import conf_get
from distbot.common.message import get_nick_from_message, get_words
-
logger = logging.getLogger(__name__)
try:
steep = int(words[1])
except ValueError as e:
- return {
- 'msg': sender + ': error when parsing int(%s): %s' % (
- words[1], str(e)
- )
- }
+ return Action(msg=f"{sender}: error when parsing int(%s): %s" % (words[1], str(e)))
ready = time.time() + steep
return Action(
msg=sender + ': Tea timer set to %s' % time.strftime('%Y-%m-%d %H:%M', time.localtime(ready)),
- event=Action(time=ready, msg=(sender + ': Your tea is ready!'), mutex='teatimer_{}'.format(sender))
+ event=Action(time=ready, msg=f'{sender}: Your tea is ready!', mutex=f'teatimer_{sender}')
)