Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- from __future__ import unicode_literals, absolute_import, print_function, divis$
- from sopel.module import commands
- portrait_links = [
- "I like donuts: http://i.imgur.com/T4MJIcN.png",
- "Check out my axe: http://i.imgur.com/z4E3mIt.png"
- ]
- current_portrait_list = list()
- @commands('portrait', 'p', 'me')
- def portrait(bot, trigger):
- # Treat all portrait links as a random playlist
- if len(current_portrait_list) == 0:
- current_portrait_list = list(portait_links)
- random.shuffle(current_portrait_list)
- bot.reply(current_portrait_list[0])
- del(current_portrait_list[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement