Compare commits

..

No commits in common. "8c7b87dbacbcedf02b71883106c97c2c70dcb0d1" and "21e69cf0c2565599a887d1a25c7e0eaeab0a4993" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View file

@ -163,10 +163,9 @@ export default {
// eslint-disable-next-line no-case-declarations
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);
let option = OptionReminder.Nothing;
let seconds: number;
if (time != null) {
// Cli
let option = OptionReminder.Nothing;
// Split time
if (time?.endsWith('@')) {
@ -177,17 +176,12 @@ export default {
option = OptionReminder.DirectMessage;
}
seconds = strToSeconds(time);
const seconds = strToSeconds(time);
await interaction.reply(`${option} - ${seconds}`);
} else {
// 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;
}
// List reminders

View file

@ -49,6 +49,7 @@ const initDatabase = (db: Database) => {
id INTEGER PRIMARY KEY, \
data TEXT, \
expiration_date INTEGER, \
message_id INTEGER, \
option_id INTEGER, \
channel_id INTEGER, \
creation_date INTEGER, \