update database, recreate yours after this!
This commit is contained in:
parent
531dad68c2
commit
0c88a842c9
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ class Reminder(Database):
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
message_id INTEGER,
|
message_id INTEGER,
|
||||||
channel_id INTEGER,
|
channel_id INTEGER,
|
||||||
mention_bool INTEGER,
|
extrarg_id INTEGER,
|
||||||
reminder_str TEXT,
|
reminder_str TEXT,
|
||||||
creation_int INTEGER,
|
creation_int INTEGER,
|
||||||
expiration_int INTEGER,
|
expiration_int INTEGER,
|
||||||
|
@ -25,7 +25,7 @@ class Reminder(Database):
|
||||||
"""Ajoute un reminder"""
|
"""Ajoute un reminder"""
|
||||||
requete = """
|
requete = """
|
||||||
INSERT INTO reminder (
|
INSERT INTO reminder (
|
||||||
message_id, channel_id, mention_bool, reminder_str, creation_int, expiration_int, user_id, guild_id
|
message_id, channel_id, extrarg_id, reminder_str, creation_int, expiration_int, user_id, guild_id
|
||||||
) VALUES (
|
) VALUES (
|
||||||
?, ?, ?, ?, ?, ?, ?, ?
|
?, ?, ?, ?, ?, ?, ?, ?
|
||||||
);
|
);
|
||||||
|
@ -43,7 +43,7 @@ class Reminder(Database):
|
||||||
def listeReminder(self, userID = int, guildID = int):
|
def listeReminder(self, userID = int, guildID = int):
|
||||||
"""Retourne la liste des reminders d'un utilisateur"""
|
"""Retourne la liste des reminders d'un utilisateur"""
|
||||||
requete = """
|
requete = """
|
||||||
SELECT reminder_str, creation_int, expiration_int FROM reminder
|
SELECT reminder_str, creation_int, expiration_int, id FROM reminder
|
||||||
WHERE user_id = ? AND guild_id = ?
|
WHERE user_id = ? AND guild_id = ?
|
||||||
"""
|
"""
|
||||||
return self.affichageResultat(self.requete(requete, [userID, guildID]))
|
return self.affichageResultat(self.requete(requete, [userID, guildID]))
|
||||||
|
@ -51,7 +51,7 @@ class Reminder(Database):
|
||||||
def recuperationExpiration(self, time = int):
|
def recuperationExpiration(self, time = int):
|
||||||
"""Récupère les reminders qui sont arrivés à expiration et ses infos"""
|
"""Récupère les reminders qui sont arrivés à expiration et ses infos"""
|
||||||
requete = """
|
requete = """
|
||||||
SELECT channel_id, mention_bool, reminder_str, creation_int, user_id, id, message_id FROM reminder
|
SELECT channel_id, extrarg_id, reminder_str, creation_int, user_id, id, message_id FROM reminder
|
||||||
WHERE expiration_int < ?
|
WHERE expiration_int < ?
|
||||||
"""
|
"""
|
||||||
return self.affichageResultat(self.requete(requete, time))
|
return self.affichageResultat(self.requete(requete, time))
|
||||||
|
|
Reference in a new issue