PossumBot icon indicating copy to clipboard operation
PossumBot copied to clipboard

Commands not working

Open NoqturnalOne opened this issue 1 year ago • 4 comments

Bot is running and online with administrator permissions to the server but doesn't respond to commands.

I have done !myakish and @botname !myakish and it will not grant me admin to the server.

NoqturnalOne avatar Jan 07 '24 23:01 NoqturnalOne

Noticed the bot seems to be going offline shortly after starting it via bash terminal:

<Hostname>:PossumBot-master username$ ./startbot.sh Loading Commands... PossumBot Is Now Activated https://discord.com/api/oauth2/authorize?client_id=1193680097966817411&permissions=8&scope=bot /Users/username/Downloads/PossumBot-master/bot.js:60 let cmd = bot.commands.get(command.slice(prefix.length)); ^

TypeError: Cannot read properties of undefined (reading 'slice') at Client. (/Users/username/Downloads/PossumBot-master/bot.js:60:37) at Client.emit (node:events:514:28) at MessageCreateAction.handle (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at module.exports [as MESSAGE_CREATE] (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) at WebSocketShard.onPacket (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) at WebSocketShard.onMessage (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) at WebSocket.onMessage (/Users/username/Downloads/PossumBot-master/node_modules/ws/lib/event-target.js:132:16) at WebSocket.emit (node:events:514:28) at Receiver.receiverOnMessage (/Users/username/Downloads/PossumBot-master/node_modules/ws/lib/websocket.js:834:20)

Node.js v20.10.0

NoqturnalOne avatar Jan 08 '24 05:01 NoqturnalOne

Bot is still not successfully staying online but now I have more info to contribute to the thread.

Bot is failing to execute commands and printing in console:

DiscordAPIError: Missing Permissions at RequestHandler.execute (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/rest/RequestHandler.js:154:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async RequestHandler.push (/Users/username/Downloads/PossumBot-master/node_modules/discord.js/src/rest/RequestHandler.js:39:14) at async module.exports.run (/Users/username/Downloads/PossumBot-master/commands/myakish.js:7:16)

This is despite adding the bot to the server with the permission integer of 8 for Administrator.

NoqturnalOne avatar Jan 09 '24 20:01 NoqturnalOne

im getting the same problem rn i can get it to stay online but when i put in any commands i get this

TypeError: Cannot read properties of undefined (reading 'slice')

WhyJ63 avatar Jan 17 '24 05:01 WhyJ63

same problem here idk what to do

billijohnson avatar Jan 25 '24 21:01 billijohnson

Fixed

WANstorm avatar Apr 30 '24 03:04 WANstorm