added beans and not like this jokes manually
TODO: convert to joke objects
This commit is contained in:
12
robopage.py
12
robopage.py
@@ -1,6 +1,8 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
from threading import Lock
|
||||
|
||||
import discord
|
||||
@@ -29,6 +31,9 @@ class RoboPage(discord.Client):
|
||||
re.IGNORECASE)
|
||||
self.leaderboard_regex = re.compile('^most (?P<emoji>\w+) leaderboard$', re.IGNORECASE)
|
||||
|
||||
with Path('gifs.json').open('r') as file:
|
||||
self.gifs = json.load(file)
|
||||
|
||||
def run(self):
|
||||
return super().run(os.getenv('DISCORD_TOKEN'))
|
||||
|
||||
@@ -68,6 +73,13 @@ class RoboPage(discord.Client):
|
||||
except IndexError as e:
|
||||
await message.reply('NObody')
|
||||
|
||||
elif 'not like this' in message.content.lower():
|
||||
await message.reply(self.gifs['not like this'])
|
||||
|
||||
elif 'beans' in message.content.lower():
|
||||
await message.reply('Somebody help! I\'ve got beans in my motherboard!\n')
|
||||
await message.channel.send(self.gifs['beans'])
|
||||
|
||||
else:
|
||||
for joke in self.jokes:
|
||||
if (scan_res := joke.scan(message)):
|
||||
|
||||
Reference in New Issue
Block a user