Response sender is not needed anymore, private channels are now better handled

This commit is contained in:
nemunaire 2014-09-18 07:57:06 +02:00
parent 5e202063d4
commit 772d68a34d
32 changed files with 161 additions and 182 deletions

View file

@ -30,8 +30,7 @@ def cmd_sleep(msg):
for i in range(0,6):
f.append(f[i] - timedelta(hours=1,minutes=30))
g.append(f[i+1].strftime("%H:%M"))
return Response(msg.sender,
"You should try to fall asleep at one of the following"
return Response("You should try to fall asleep at one of the following"
" times: %s" % ', '.join(g), channel=msg.channel)
# Just get awake times
@ -41,7 +40,6 @@ def cmd_sleep(msg):
for i in range(0,6):
f.append(f[i] + timedelta(hours=1,minutes=30))
g.append(f[i+1].strftime("%H:%M"))
return Response(msg.sender,
"If you head to bed right now, you should try to wake"
return Response("If you head to bed right now, you should try to wake"
" up at one of the following times: %s" %
', '.join(g), channel=msg.channel)