Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import JustIRC
- import random
- bot = JustIRC.IRCConnection()
- class Wallet:
- def __init__(self, name, amount):
- self.name = name
- self.amount = amount
- coinName = "ShitCoin"
- userWallets = []
- possibilities = [
- "Points the gun at {} and pulls the trigger, CLICK!",
- "Points the gun at {} and pulls the trigger, CLICK!",
- "Points the gun at {} and pulls the trigger, CLICK!",
- "Points the gun at {} and pulls the trigger, CLICK!",
- "Points the gun at {} and pulls the trigger, CLICK!",
- "Points the gun at {} and pulls the trigger, BOOM! you're dead"
- ]
- def on_connect(bot):
- bot.set_nick("bruddah")
- bot.send_user_packet("bruddah")
- def on_welcome(bot):
- bot.join_channel("#gameroom")
- def on_message(bot, channel, sender, message):
- if ".rr" in message.lower():
- return_message = random.choice(possibilities).format(sender)
- bot.send_message(channel, return_message)
- if ".register" in message.lower():
- data = Wallet("{}", 100)
- userWallets.append(data)
- bot.send_message(channel, "{} is now registered!")
- if ".balance" in message.lower():
- for usr in userWallets:
- if usr.nama == "{}":
- bot.send_message(channel, "{} your balance is: " + usr.amount)
- else:
- bot.send_message(channel, "register firt ")
- bot.on_connect.append(on_connect)
- bot.on_welcome.append(on_welcome)
- bot.on_public_message.append(on_message)
- bot.connect("irc.freenode.net")
- bot.run_loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement