fix types

This commit is contained in:
Mylloon 2023-01-16 17:16:58 +01:00
parent ec0098e3d0
commit 2593f92dad
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -24,7 +24,7 @@ export default async (client: Client) => {
const info = { const info = {
locale: element.locale, locale: element.locale,
message: element.data, message: element.data,
createdAt: element.creation_date, createdAt: Number(element.creation_date),
channelId: `${element.channel_id}`, channelId: `${element.channel_id}`,
userId: `${element.user_id}`, userId: `${element.user_id}`,
guildId: `${element.guild_id}`, guildId: `${element.guild_id}`,
@ -32,7 +32,7 @@ export default async (client: Client) => {
if (element.expiration_date <= now) { if (element.expiration_date <= now) {
// Reminder expired // Reminder expired
deleteReminder(client, element.creation_date, `${element.user_id}`).then((res) => { deleteReminder(client, Number(element.creation_date), `${element.user_id}`).then((res) => {
if (res != true) { if (res != true) {
throw res; throw res;
} }
@ -44,7 +44,7 @@ export default async (client: Client) => {
const timeoutId = setTimeoutReminder(client, info, element.option_id, (element.expiration_date - now) / 1000); const timeoutId = setTimeoutReminder(client, info, element.option_id, (element.expiration_date - now) / 1000);
// Update timeout in database // Update timeout in database
element.timeout_id = timeoutId; element.timeout_id = String(timeoutId);
updateReminder(client, element).then((res) => { updateReminder(client, element).then((res) => {
if (res != true) { if (res != true) {
throw res; throw res;