#Using nextjs to post message with Webhook (timers promises error)

1 messages · Page 1 of 1 (latest)

static flower

Hi, is it not possible to use a nextjs web app and discord.js to use a webhook to post a message to a channel?
I am getting an error which is related to timers/promises:

./node_modules/@discordjs/rest/dist/index.js:282:0
Module not found: Can't resolve 'timers/promises'

Import trace for requested module:
./node_modules/discord.js/src/index.js
./components/functions/general/discordWebhook.ts
./components/ui/FeedbackButton.tsx
./pages/dstake/[token].tsx

https://nextjs.org/docs/messages/module-not-found