Advertisement
Melodeiro

Untitled

Feb 20th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import minqlx
  2. import random
  3.  
  4. class who(minqlx.Plugin):
  5.     def __init__(self):
  6.         self.add_command("who", self.cmd_who)
  7.    
  8.     def cmd_who(self, player, msg, channel):
  9.         if len(msg) < 2:
  10.             channel.reply("Type your question: !who <question>")
  11.         else:
  12.             random_player = random.choice(self.players())
  13.             channel.reply(str(random_player))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement