mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 01:53:39 +01:00
re-add limited selection of auto-responses
This commit is contained in:
parent
2e613adaaa
commit
83a8c4ffa7
5 changed files with 13 additions and 1 deletions
BIN
assets/boris.jpg
Normal file
BIN
assets/boris.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 309 KiB |
BIN
assets/carat.jpg
Normal file
BIN
assets/carat.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
BIN
assets/fedora.jpg
Normal file
BIN
assets/fedora.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
assets/lupupa.jpg
Normal file
BIN
assets/lupupa.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -145,7 +145,6 @@ class Events(commands.Cog):
|
|||
return
|
||||
|
||||
if message.channel.name == "femboy-hole":
|
||||
|
||||
def generate_payload(_message: discord.Message) -> MessagePayload:
|
||||
_payload = MessagePayload(
|
||||
message_id=_message.id,
|
||||
|
@ -184,6 +183,19 @@ class Events(commands.Cog):
|
|||
if message.channel.permissions_for(message.guild.me).manage_messages:
|
||||
await message.delete(delay=1)
|
||||
|
||||
if message.content:
|
||||
assets = Path.cwd() / "assets"
|
||||
words = re.split(r"\s+", message.content)
|
||||
words = set(map(str.lower, words))
|
||||
if "lupupa" in words and (file := assets / "lupupa.jpg").exists():
|
||||
await message.reply(file=discord.File(file), delete_after=60)
|
||||
elif any(word in words for word in ("fedora", "nix", "nixos")) and (file := assets / "fedora.jpg").exists():
|
||||
await message.reply(file=discord.File(file), delete_after=60)
|
||||
elif "carat" in words and (file := assets / "carat.jpg").exists():
|
||||
await message.reply(file=discord.File(file), delete_after=60)
|
||||
elif "boris" in words and (file := assets / "boris.jpg").exists():
|
||||
await message.reply(file=discord.File(file), delete_after=60)
|
||||
|
||||
@tasks.loop(minutes=10)
|
||||
async def fetch_discord_atom_feed(self):
|
||||
if not SPAM_CHANNEL:
|
||||
|
|
Loading…
Reference in a new issue