My bot works for 7-8 hours then i get that message.
at GuildMember.isStaff (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\app.js:126:98) at Client. (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\app.js:56:25) at Client.emit (events.js:400:28) at VoiceStateUpdate.handle (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\actions\\VoiceStateUpdate.js:40:14) at Object.module.exports [as VOICE_STATE_UPDATE] (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\handlers\\VOICE_STATE_UPDATE.js:4:35) at WebSocketManager.handlePacket (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketManager.js:384:31) at WebSocketShard.onPacket (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketShard.js:444:22) at WebSocketShard.onMessage (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketShard.js:301:10) at WebSocket.onMessage (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\ws\\lib\\event-target.j s:132:16) at WebSocket.emit (events.js:400:28) (Use
node --trace-warnings ...
to show where the warning was created) (node:12296) 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:12296) [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:12296) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'position' of undefined at GuildMember.isStaff (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\app.js:126:98) at Client. (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\app.js:56:25) at Client.emit (events.js:400:28) at VoiceStateUpdate.handle (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\actions\\VoiceStateUpdate.js:40:14) at Object.module.exports [as VOICE_STATE_UPDATE] (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\handlers\\VOICE_STATE_UPDATE.js:4:35) at WebSocketManager.handlePacket (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketManager.js:384:31) at WebSocketShard.onPacket (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketShard.js:444:22) at WebSocketShard.onMessage (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\discord.js\\src\\client\\websocket\\WebSocketShard.js:301:10) at WebSocket.onMessage (C:\\Users\\Mert\\Desktop\\Tasarım\\Discord Botları\\bot3\\node_modules\\ws\\lib\\event-target.j s:132:16) at WebSocket.emit (events.js:400:28) (node:12296) 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)
What should i do ?
You have a few options I'd think:
You need to handle promise rejections accordingly or at least handle them in some way. The error message does have instructions at the bottom "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()"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.