slayerinc / AntiSwear-Bot

Ant-Swear Bot, is a Discord bot, Made to prevent swearing/toxicity. And to make a better community for everyone, That uses this bot for their server. Anti-Swear Bot was made with Typescript, As it is the language i am working with currently. Hope this bot gives you the results it was made for.
GNU General Public License v3.0
0 stars 1 forks source link

UnhandledPromiseRejectionWarning #1

Open tekwreck opened 3 years ago

tekwreck commented 3 years ago

Running code as is, tried to .add no errors but when I .list i get this error

(node:33688) UnhandledPromiseRejectionWarning: TypeError: get.map is not a function
    at F:\AntiSwear-Bot-master\commands\list.ts:19:13
    at step (F:\AntiSwear-Bot-master\commands\list.ts:33:23)
    at Object.next (F:\AntiSwear-Bot-master\commands\list.ts:14:53)
    at fulfilled (F:\AntiSwear-Bot-master\commands\list.ts:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:33688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:33688) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:33688) UnhandledPromiseRejectionWarning: TypeError: get.map is not a function
    at F:\AntiSwear-Bot-master\commands\list.ts:19:13
    at step (F:\AntiSwear-Bot-master\commands\list.ts:33:23)
    at Object.next (F:\AntiSwear-Bot-master\commands\list.ts:14:53)
    at fulfilled (F:\AntiSwear-Bot-master\commands\list.ts:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:33688) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:33688) UnhandledPromiseRejectionWarning: TypeError: get.map is not a function
    at F:\AntiSwear-Bot-master\commands\list.ts:19:13
    at step (F:\AntiSwear-Bot-master\commands\list.ts:33:23)
    at Object.next (F:\AntiSwear-Bot-master\commands\list.ts:14:53)
    at fulfilled (F:\AntiSwear-Bot-master\commands\list.ts:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
tekwreck commented 3 years ago

I installed the lastest NPM LTS for this if that helps.