say hello to new TG users and improve memery

This commit is contained in:
lza_menace 2020-07-10 22:01:41 -07:00
parent 60db3a6309
commit aa74b267bd
2 changed files with 53 additions and 14 deletions

View file

@ -18,18 +18,7 @@ class IRCBot(pydle.Client):
print(f"Target: {target} - Source: {source} - Message: {message}")
if self.nickname in message:
imgs = [
"https://i.redd.it/f2z7ms4ai8751.png",
"https://i.redd.it/j207p3l093751.png",
"https://i.redd.it/j3dq88hrmn651.jpg",
"https://i.redd.it/w24t2jwo6h651.jpg",
"https://i.redd.it/vi6bmspgl5651.png",
"https://i.redd.it/m392y5szvx551.jpg",
"https://i.redd.it/t59v1s3msu551.jpg",
"https://i.redd.it/x5ueaie8hs551.jpg",
"https://i.redd.it/3je54bq091551.png",
]
await self.message(target, f"Sup. I don't do a whole lot yet. Have a picture: {random.choice(imgs)}")
await self.message(target, f"Sup. I don't do a whole lot yet. Have a picture: {random.choice(config.IMAGES)}")
# elif message.startswith("!proposal "):
# split_msg = message.split()
# param = split_msg[1]
@ -49,6 +38,18 @@ class IRCBot(pydle.Client):
# await self.message(target, f"I didn't get a valid response from the WFS API. Debug: {r.content}")
# else:
# await self.message(target, f"You're supposed to provide a number ya dingus!")
elif source == config.TELEGRAM_BRIDGE_NAME and config.TELEGRAM_JOIN_SUBSTR in message:
# 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!")
elif message.startswith("!supply"):
r = requests.get("https://funding.wownero.com/api/1/wow/supply")
if r.status_code == 200:
data = r.json()["data"]
await self.message(target, f"The current total supply of WOW is {data}")
else:
await self.message(target, f"I didn't get a valid response from the WFS API. Debug: {r.content}")
elif message.startswith("!proposals"):
r = requests.get("https://funding.wownero.com/api/1/proposals?status=2")
if r.status_code == 200:
@ -79,7 +80,7 @@ class IRCBot(pydle.Client):
if __name__ == '__main__':
try:
print(f"[+] Starting IRC bot connecting to {config.IRC_HOST}")
print(f"[+] Starting IRC bot connecting to {config.IRC_HOST}...\n")
client = IRCBot(
nickname=config.BOT_NICKNAME,
sasl_mechanism = "EXTERNAL",
@ -87,7 +88,7 @@ if __name__ == '__main__':
)
client.run(config.IRC_HOST, tls=True, tls_verify=False)
except KeyboardInterrupt:
print('Adios')
print(' - Adios')
try:
sys.exit(0)
except SystemExit:

View file

@ -15,3 +15,41 @@ SECRET_KEY = 'secret session key here' # encrypts the session token
# IRC
IRC_HOST = 'ajnvpgl6prmkb7yktvue6im5wiedlz2w32uhcwaamdiecdrfpwwgnlqd.onion'
TELEGRAM_BRIDGE_NAME = 'WowBridge'
TELEGRAM_JOIN_SUBSTR = 'has joined the Telegram Group'
# MEMES
IMAGES = [
'https://i.imgflip.com/44lwio.jpg',
'https://i.imgur.com/1j0lAMZ.png',
'https://i.imgur.com/3IFtDIQ.jpg',
'https://i.imgur.com/49W12pr.png',
'https://i.imgur.com/Cly8ERi.jpg',
'https://i.imgur.com/DK7fepa.jpg',
'https://i.imgur.com/G5lVTQX.jpg',
'https://i.imgur.com/HYzcRr2.png',
'https://i.imgur.com/Kcmaage.png',
'https://i.imgur.com/MS4odnv.gif',
'https://i.imgur.com/MXJ2slS.png',
'https://i.imgur.com/SPhn9u0.png',
'https://i.imgur.com/WQUmuHl.jpg',
'https://i.imgur.com/c16qByl.png',
'https://i.imgur.com/ck7Uav1.jpg',
'https://i.imgur.com/favicon.ico',
'https://i.imgur.com/h3PjuVl.jpg',
'https://i.imgur.com/i5I0Qrm.jpg',
'https://i.imgur.com/i9gKtXe.jpg',
'https://i.imgur.com/iSXJluW.jpg',
'https://i.imgur.com/ixvottX.png',
'https://i.imgur.com/o56reOl.jpg',
'https://i.imgur.com/oYB41Hk.png',
'https://i.imgur.com/q7n2rEZ.png',
'https://i.imgur.com/t0CSrfo.png',
'https://i.imgur.com/uDrpKJ8.png',
'https://i.imgur.com/uhQGV7b.jpg',
'https://i.imgur.com/utjI6MW.png',
'https://i.imgur.com/v7clSBi.png',
'https://i.imgur.com/vQ9v2ub.png',
'https://i.imgur.com/wW0ueSf.gif',
'https://i.imgur.com/xyiE9vx.mp4',
]