added some jokes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import logging
|
||||
import re
|
||||
from random import choice
|
||||
|
||||
from nextcord import Client, Message
|
||||
from nextcord import utils
|
||||
@@ -126,3 +127,33 @@ class ChiliJoke(base.GifJoke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('chil(i|ly)', re.IGNORECASE)
|
||||
|
||||
|
||||
class Jaccuse(base.Joke):
|
||||
urls = [
|
||||
'https://tenor.com/view/jaccuse-the-good-fight-i-accuse-im-accusing-you-paramount-plus-gif-21890096',
|
||||
'https://tenor.com/view/glee-jaccuse-i-accuse-blame-shouting-gif-17122248',
|
||||
'https://tenor.com/view/jaccuse-gif-5729034',
|
||||
'https://tenor.com/view/jaccuse-frankie-lily-tomlin-grace-and-frankie-accuse-gif-17551378',
|
||||
'https://tenor.com/view/michael-gove-gove-jaccuse-accuse-conservatives-gif-17652472'
|
||||
]
|
||||
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('j\'?accuse', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
if message.reference is not None:
|
||||
initial = await message.channel.fetch_message(message.reference.message_id)
|
||||
await initial.reply(choice(self.urls))
|
||||
else:
|
||||
await message.reply(choice(self.urls))
|
||||
|
||||
|
||||
class GoodBot(base.Joke):
|
||||
@property
|
||||
def regex(self) -> re.Pattern:
|
||||
return re.compile('(\w+) bot', re.IGNORECASE)
|
||||
|
||||
async def respond(self, message: Message, client: Client, match: re.Match):
|
||||
await message.add_reaction(utils.get(client.emojis, name='kaylon'))
|
||||
|
||||
10
src/main.py
10
src/main.py
@@ -17,11 +17,11 @@ if __name__ == '__main__':
|
||||
@client.event
|
||||
async def on_ready():
|
||||
await client.handle_ready()
|
||||
await client.data.scan_messages(
|
||||
client=client,
|
||||
# limit=50,
|
||||
days=2,
|
||||
)
|
||||
# await client.data.scan_messages(
|
||||
# client=client,
|
||||
# limit=50,
|
||||
# # days=7,
|
||||
# )
|
||||
# chan = await client.fetch_channel(690588413543579649)
|
||||
# msg = await chan.fetch_message(936684979654623293)
|
||||
# logging.info(f'Msg: {msg.clean_content}')
|
||||
|
||||
Reference in New Issue
Block a user