add file exists checks

This commit is contained in:
Nexus 2023-05-04 23:54:32 +01:00
parent c0a7eb6943
commit d0e2e44d68

View file

@ -389,15 +389,22 @@ class Events(commands.Cog):
r"^linux$": { r"^linux$": {
"content": lambda: (assets / "copypasta.txt").read_text(), "content": lambda: (assets / "copypasta.txt").read_text(),
"meta": { "meta": {
"needs_mention": True "needs_mention": True,
"check": (assets / "copypasta.txt").exists
} }
}, },
r"carat": { r"carat": {
"file": discord.File(assets / "carat.jpg"), "file": discord.File(assets / "carat.jpg"),
"delete_after": None "delete_after": None,
"meta": {
"check": (assets / "carat.jpg").exists
}
}, },
r"lupupa": { r"lupupa": {
"file": discord.File(assets / "lupupa.jpg"), "file": discord.File(assets / "lupupa.jpg"),
"meta": {
"check": (assets / "lupupa.jpg").exists
}
}, },
r"[s5]+(m)+[e3]+[g9]+": { r"[s5]+(m)+[e3]+[g9]+": {
"func": send_smeg, "func": send_smeg,
@ -405,7 +412,8 @@ class Events(commands.Cog):
"sub": { "sub": {
r"pattern": r"(-_.\s)+", r"pattern": r"(-_.\s)+",
r"with": '' r"with": ''
} },
"check": (assets / "smeg").exists
} }
}, },
r"(what|huh)(\?|!)*": { r"(what|huh)(\?|!)*": {