mirror of
https://git.wownero.com/lza_menace/lza-wowbot.git
synced 2024-08-15 03:23:51 +00:00
add simple tipping func and update some messages
This commit is contained in:
parent
997798be79
commit
d61ec5d5ed
1 changed files with 13 additions and 3 deletions
|
@ -37,7 +37,17 @@ class IRCBot(pydle.Client):
|
||||||
)
|
)
|
||||||
u.save()
|
u.save()
|
||||||
print({"type": "registration", "user": source, "address_index": new_address[0]})
|
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"):
|
elif message.startswith("tip"):
|
||||||
msg_split = message.split()
|
msg_split = message.split()
|
||||||
l = len(msg_split)
|
l = len(msg_split)
|
||||||
|
@ -46,7 +56,7 @@ class IRCBot(pydle.Client):
|
||||||
elif l == 2:
|
elif l == 2:
|
||||||
await self.message(target, f"Need more info. `tip {msg_split[1]} <amount>`")
|
await self.message(target, f"Need more info. `tip {msg_split[1]} <amount>`")
|
||||||
elif l == 3:
|
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:
|
else:
|
||||||
await self.message(target, "You're passing way too much shit bro. `tip <recipient_name> <amount>`")
|
await self.message(target, "You're passing way too much shit bro. `tip <recipient_name> <amount>`")
|
||||||
# elif message.startswith("!proposal "):
|
# elif message.startswith("!proposal "):
|
||||||
|
@ -72,7 +82,7 @@ class IRCBot(pydle.Client):
|
||||||
# ex = 'DudeMan (@DudeManBro) has joined the Telegram Group!'
|
# ex = 'DudeMan (@DudeManBro) has joined the Telegram Group!'
|
||||||
strip_last = message.split()[1][:-1]
|
strip_last = message.split()[1][:-1]
|
||||||
strip_first = strip_last[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)
|
# isadmin = await self.is_admin(source)
|
||||||
# print(isadmin)
|
# print(isadmin)
|
||||||
|
|
Loading…
Reference in a new issue