Advertisement
Guest User

axem

a guest
Feb 7th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import random
  2.  
  3. from __future__ import unicode_literals, absolute_import, print_function, divis$
  4. from sopel.module import commands
  5.  
  6.  
  7. portrait_links = [
  8. "I like donuts: http://i.imgur.com/T4MJIcN.png",
  9. "Check out my axe: http://i.imgur.com/z4E3mIt.png"
  10. ]
  11.  
  12. current_portrait_list = list()
  13.  
  14. @commands('portrait', 'p', 'me')
  15. def portrait(bot, trigger):
  16.  
  17. # Treat all portrait links as a random playlist
  18. if len(current_portrait_list) == 0:
  19. current_portrait_list = list(portait_links)
  20. random.shuffle(current_portrait_list)
  21.  
  22. bot.reply(current_portrait_list[0])
  23. del(current_portrait_list[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement