replace mention by extrarg
This commit is contained in:
parent
2d21d9276b
commit
d473651a6c
2 changed files with 5 additions and 5 deletions
|
@ -491,7 +491,7 @@ class Utils(commands.Cog):
|
||||||
reminder = None
|
reminder = None
|
||||||
|
|
||||||
embed = discord.Embed(color = 0xC41B1B)
|
embed = discord.Embed(color = 0xC41B1B)
|
||||||
mention = 0
|
extrarg = 0
|
||||||
if not reminder:
|
if not reminder:
|
||||||
reminder = "Notification"
|
reminder = "Notification"
|
||||||
if time == "help":
|
if time == "help":
|
||||||
|
@ -499,7 +499,7 @@ class Utils(commands.Cog):
|
||||||
else:
|
else:
|
||||||
if time.lower().endswith("@"):
|
if time.lower().endswith("@"):
|
||||||
time = time[:-1]
|
time = time[:-1]
|
||||||
mention = 1
|
extrarg = 1
|
||||||
seconds = stringTempsVersSecondes(time)
|
seconds = stringTempsVersSecondes(time)
|
||||||
if type(seconds) != int:
|
if type(seconds) != int:
|
||||||
if fromSlash != True:
|
if fromSlash != True:
|
||||||
|
@ -514,7 +514,7 @@ class Utils(commands.Cog):
|
||||||
messageID = None
|
messageID = None
|
||||||
if fromSlash != True:
|
if fromSlash != True:
|
||||||
messageID = ctx.message.id
|
messageID = ctx.message.id
|
||||||
Reminder().ajoutReminder(messageID, ctx.channel.id, mention, reminder, now, now + seconds, ctx.author.id, ctx.guild.id)
|
Reminder().ajoutReminder(messageID, ctx.channel.id, extrarg, reminder, now, now + seconds, ctx.author.id, ctx.guild.id)
|
||||||
return await ctx.send(f"Ok, je t'en parles dans {timedeltaToString(seconds)} avec 1m de retard maximum.")
|
return await ctx.send(f"Ok, je t'en parles dans {timedeltaToString(seconds)} avec 1m de retard maximum.")
|
||||||
await ctx.send(embed = embed)
|
await ctx.send(embed = embed)
|
||||||
@_reminder.error
|
@_reminder.error
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Reminder(Database):
|
||||||
"""
|
"""
|
||||||
self.requete(requete)
|
self.requete(requete)
|
||||||
|
|
||||||
def ajoutReminder(self, messageID = int, channelID = int, mention = int, reminder = str, creation = int, expiration = int, userID = int, guildID = int):
|
def ajoutReminder(self, messageID = int, channelID = int, extrarg = int, reminder = str, creation = int, expiration = int, userID = int, guildID = int):
|
||||||
"""Ajoute un reminder."""
|
"""Ajoute un reminder."""
|
||||||
requete = """
|
requete = """
|
||||||
INSERT INTO reminder (
|
INSERT INTO reminder (
|
||||||
|
@ -30,7 +30,7 @@ class Reminder(Database):
|
||||||
?, ?, ?, ?, ?, ?, ?, ?
|
?, ?, ?, ?, ?, ?, ?, ?
|
||||||
);
|
);
|
||||||
"""
|
"""
|
||||||
self.requete(requete, [messageID, channelID, mention, reminder, creation, expiration, userID, guildID])
|
self.requete(requete, [messageID, channelID, extrarg, reminder, creation, expiration, userID, guildID])
|
||||||
|
|
||||||
def suppressionReminder(self, id = int):
|
def suppressionReminder(self, id = int):
|
||||||
"""Supprime un reminder."""
|
"""Supprime un reminder."""
|
||||||
|
|
Reference in a new issue