mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
add file exists checks
This commit is contained in:
parent
c0a7eb6943
commit
d0e2e44d68
1 changed files with 11 additions and 3 deletions
|
@ -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)(\?|!)*": {
|
||||||
|
|
Loading…
Reference in a new issue