From d61ec5d5edb01afa25781a7d5b51042dbede4fa3 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Tue, 14 Jul 2020 15:27:53 -0700 Subject: [PATCH] add simple tipping func and update some messages --- ircbot/bot.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ircbot/bot.py b/ircbot/bot.py index f65c991..05556d3 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -37,7 +37,17 @@ class IRCBot(pydle.Client): ) u.save() print({"type": "registration", "user": source, "address_index": new_address[0]}) - await self.message(target, f"Grats bra, you're locked and loaded. Send funds to {new_address[1]}") + await self.message(target, f"Grats bra, you're locked and loaded. Send Wownero to {new_address[1]}") + elif message.startswith("deposit"): + wallet = wownero.Wallet() + if not wallet.connected: + await self.message(target, f"My connection to the wallet RPC endpoint is broken so I can't do that right now. Paging: {config.ADMIN_NICKNAMES}") + if db.User.filter(irc_nick=source): + u = db.User.get(db.User.irc_nick == source) + address = wallet.addresses() + await self.message(target, f"Here's your deposit address {source}: {address[u.address_index]}") + else: + await self.message(target, f"You aren't registered. Try saying: `register`") elif message.startswith("tip"): msg_split = message.split() l = len(msg_split) @@ -46,7 +56,7 @@ class IRCBot(pydle.Client): elif l == 2: await self.message(target, f"Need more info. `tip {msg_split[1]} `") elif l == 3: - await self.message(target, f"Normally I'd send a tip of {msg_split[2]} WOW to {msg_split[1]}, but I'm not ready to do that just yet.") + await self.message(target, f"Normally I'd send a tip of {msg_split[2]} Wownero to {msg_split[1]}, but I'm not ready to do that just yet.") else: await self.message(target, "You're passing way too much shit bro. `tip `") # elif message.startswith("!proposal "): @@ -72,7 +82,7 @@ class IRCBot(pydle.Client): # ex = 'DudeMan (@DudeManBro) has joined the Telegram Group!' strip_last = message.split()[1][:-1] strip_first = strip_last[1:] - await self.message(target, f"WTF is up {strip_first}! Stay tuned for more cool ass bot shit goin down!") + await self.message(target, f"WTF is up {strip_first}! Be sure to give us all your money here (https://funding.wownero.com/proposals) and start shitposting here (https://forum.wownero.com/). Stay tuned for more cool ass bot shit goin down!") # isadmin = await self.is_admin(source) # print(isadmin)