-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lastStickyMessage.delete is not a function #20
Comments
Can you provide your modified code on https://pastebin.com/ or https://paste.ofcode.org/ ? |
Sure! Here's the link https://pastebin.com/KN0azMBL |
Thank you! |
I cannot reproduce it on my end. :( |
Yeah so when I remove this piece of code I get an error.
discord-sticky-message-bot/index.js
Lines 23 to 25 in 74eb73f
Not sure what I can do to fix this.
Error:
(node:19132) UnhandledPromiseRejectionWarning: TypeError: lastStickyMessage.delete is not a function at Client.<anonymous> (C:\Users\x\Desktop\x\Sticky\index.js:29:41) at Client.emit (events.js:315:20) at MessageCreateAction.handle (C:\Users\x\Desktop\x\Sticky\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (C:\Users\x\Desktop\x\Sticky\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (C:\Users\x\Desktop\x\Sticky\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31) at WebSocketShard.onPacket (C:\Users\x\Desktop\x\Sticky\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22) at WebSocketShard.onMessage (C:\Users\x\Desktop\x\Sticky\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10) at WebSocket.onMessage (C:\Users\x\Desktop\x\Sticky\node_modules\ws\lib\event-target.js:132:16) at WebSocket.emit (events.js:315:20) at Receiver.receiverOnMessage (C:\Users\x\Desktop\x\Sticky\node_modules\ws\lib\websocket.js:834:20) (Use
node --trace-warnings ...to show where the warning was created) (node:19132) 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:19132) [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.
The text was updated successfully, but these errors were encountered: