The real other fix, not a .gitignore who want to commit alone
This commit is contained in:
parent
9c3c0bf4d5
commit
b98654a09e
2 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ class User:
|
||||||
res = None
|
res = None
|
||||||
if self.kfet:
|
if self.kfet:
|
||||||
cmds = requests.get(KFET_URL).json()
|
cmds = requests.get(KFET_URL).json()
|
||||||
if str(self.kfet) in cmds:
|
if cmds and str(self.kfet) in cmds:
|
||||||
res = 1 if cmds[str(self.kfet)]["statut"] == "T" else 2
|
res = 1 if cmds[str(self.kfet)]["statut"] == "T" else 2
|
||||||
elif get_now().hour >= 14:
|
elif get_now().hour >= 14:
|
||||||
res = 3
|
res = 3
|
||||||
|
|
4
bot.py
4
bot.py
|
@ -34,7 +34,7 @@ logging.basicConfig(
|
||||||
if not isfile("token.ini"):
|
if not isfile("token.ini"):
|
||||||
logger.critical("No token specified, impossible to start the bot !")
|
logger.critical("No token specified, impossible to start the bot !")
|
||||||
exit(1)
|
exit(1)
|
||||||
API_TOKEN = open("token.ini").read()
|
API_TOKEN = open("token.ini").readline().replace("\n", "")
|
||||||
ADMIN_ID = 148441652
|
ADMIN_ID = 148441652
|
||||||
TIMES = ["", "day", "next", "week", "next week"]
|
TIMES = ["", "day", "next", "week", "next week"]
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ async def notif():
|
||||||
nt = db[u].get_notif()
|
nt = db[u].get_notif()
|
||||||
kf = db[u].get_kfet()
|
kf = db[u].get_kfet()
|
||||||
if nt:
|
if nt:
|
||||||
await bot.send_message(int(u), lang(db[u], "notif_event")+nt, parse_mode=ParseMode.MARKDOWN)
|
await bot.send_message(int(u), lang(db[u], "notif_event")+str(nt), parse_mode=ParseMode.MARKDOWN)
|
||||||
if kf is not None:
|
if kf is not None:
|
||||||
if kf == 1:
|
if kf == 1:
|
||||||
kf = lang(db[u], "kfet")
|
kf = lang(db[u], "kfet")
|
||||||
|
|
Reference in a new issue