feat: Reminders #44
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ export default async (client: Client) => {
|
|||
const info = {
|
||||
locale: element.locale,
|
||||
message: element.data,
|
||||
createdAt: element.creation_date,
|
||||
createdAt: Number(element.creation_date),
|
||||
channelId: `${element.channel_id}`,
|
||||
userId: `${element.user_id}`,
|
||||
guildId: `${element.guild_id}`,
|
||||
|
@ -32,7 +32,7 @@ export default async (client: Client) => {
|
|||
|
||||
if (element.expiration_date <= now) {
|
||||
// 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) {
|
||||
throw res;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ export default async (client: Client) => {
|
|||
const timeoutId = setTimeoutReminder(client, info, element.option_id, (element.expiration_date - now) / 1000);
|
||||
|
||||
// Update timeout in database
|
||||
element.timeout_id = timeoutId;
|
||||
element.timeout_id = String(timeoutId);
|
||||
updateReminder(client, element).then((res) => {
|
||||
if (res != true) {
|
||||
throw res;
|
||||
|
|
Loading…
Reference in a new issue