mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-23 00:08:38 -05:00
parent
c47fd0549d
commit
c48a4069cb
10
main.py
10
main.py
@ -115,6 +115,16 @@ async def on_ready():
|
||||
print("------")
|
||||
|
||||
|
||||
@bot.event
|
||||
async def on_message(message):
|
||||
msg = message.content.lower()
|
||||
for emoji, keywords in opt.msg_reacts.items():
|
||||
if any([keyword in msg for keyword in keywords]):
|
||||
await message.add_reaction(discord.utils.find(lambda x: x.id == emoji, bot.emojis))
|
||||
|
||||
await bot.process_commands(message)
|
||||
|
||||
|
||||
# --- Tasks ---
|
||||
|
||||
@tasks.loop(minutes=5)
|
||||
|
@ -31,3 +31,7 @@ exts = ['ae7q', 'base', 'fun', 'grid', 'ham', 'image', 'lookup', 'morse', 'qrz',
|
||||
|
||||
# The text to put in the "playing" status.
|
||||
game = 'with lids on 7.200'
|
||||
|
||||
# Emoji IDs and keywords for emoji reactions
|
||||
# Use the format {emoji_id (int): ('tuple', 'of', 'lowercase', 'keywords')}
|
||||
msg_reacts = {}
|
||||
|
Loading…
Reference in New Issue
Block a user