Compare commits
No commits in common. "8c7b87dbacbcedf02b71883106c97c2c70dcb0d1" and "21e69cf0c2565599a887d1a25c7e0eaeab0a4993" have entirely different histories.
8c7b87dbac
...
21e69cf0c2
2 changed files with 3 additions and 8 deletions
|
@ -163,10 +163,9 @@ export default {
|
||||||
// eslint-disable-next-line no-case-declarations
|
// eslint-disable-next-line no-case-declarations
|
||||||
let time = interaction.options.getString(loc_default?.get(`c_${filename}_sub1_opt1_name`) as string);
|
let time = interaction.options.getString(loc_default?.get(`c_${filename}_sub1_opt1_name`) as string);
|
||||||
const message = interaction.options.getString(loc_default?.get(`c_${filename}_sub1_opt2_name`) as string);
|
const message = interaction.options.getString(loc_default?.get(`c_${filename}_sub1_opt2_name`) as string);
|
||||||
let option = OptionReminder.Nothing;
|
|
||||||
let seconds: number;
|
|
||||||
if (time != null) {
|
if (time != null) {
|
||||||
// Cli
|
// Cli
|
||||||
|
let option = OptionReminder.Nothing;
|
||||||
|
|
||||||
// Split time
|
// Split time
|
||||||
if (time?.endsWith('@')) {
|
if (time?.endsWith('@')) {
|
||||||
|
@ -177,17 +176,12 @@ export default {
|
||||||
option = OptionReminder.DirectMessage;
|
option = OptionReminder.DirectMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
seconds = strToSeconds(time);
|
const seconds = strToSeconds(time);
|
||||||
await interaction.reply(`${option} - ${seconds}`);
|
await interaction.reply(`${option} - ${seconds}`);
|
||||||
} else {
|
} else {
|
||||||
// Boîte de dialogue
|
// Boîte de dialogue
|
||||||
seconds = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
client.db.run('INSERT INTO reminder ( \
|
|
||||||
data, expiration_date, option_id, channel_id, creation_date, user_id, guild_id \
|
|
||||||
) VALUES ( ?, ?, ?, ?, ?, ?, ?);', [message, interaction.createdAt.getTime() + seconds, option.valueOf(), interaction.channelId, interaction.createdAt.getTime(), interaction.user.id, interaction.guildId]);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// List reminders
|
// List reminders
|
||||||
|
|
|
@ -49,6 +49,7 @@ const initDatabase = (db: Database) => {
|
||||||
id INTEGER PRIMARY KEY, \
|
id INTEGER PRIMARY KEY, \
|
||||||
data TEXT, \
|
data TEXT, \
|
||||||
expiration_date INTEGER, \
|
expiration_date INTEGER, \
|
||||||
|
message_id INTEGER, \
|
||||||
option_id INTEGER, \
|
option_id INTEGER, \
|
||||||
channel_id INTEGER, \
|
channel_id INTEGER, \
|
||||||
creation_date INTEGER, \
|
creation_date INTEGER, \
|
||||||
|
|
Loading…
Reference in a new issue