eirexe

Untitled

Aug 10th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.73 KB | None | 0 0
  1. # coding=utf-8
  2. """
  3. Eirbot's shitty season 4 counter
  4. """
  5.  
  6. import re
  7. from willie import web
  8. from willie.module import commands, example
  9. from socket import timeout
  10. import string
  11. import HTMLParser
  12. import datetime
  13.  
  14. @commands('timetos')
  15. @example('timetos')
  16. @example('timetos')
  17. def timetos(bot, trigger):
  18.         diff = datetime.datetime(2013, 11, 24) - datetime.datetime.today()
  19.         s4hours = diff.seconds/60/60
  20.         s4mins = diff.seconds/60
  21.         s4mins = diff.seconds/60 - (diff.seconds/60/60 * 60)
  22.         s4days = diff.days
  23.         timetos4 = "Days: " + str(diff.days) + " Hours: " + str(diff.seconds/60/60) + " Minutes: " + str(diff.seconds/60 - (diff.seconds/60/60 * 60)) + " For s4!"
  24.         bot.reply(str(timetos4))
Advertisement
Add Comment
Please, Sign In to add comment