r-Techsupport / TuringBot

A scaleable Discord bot, built as a replacement for https://github.com/r-Techsupport/TechSupportBot
GNU Affero General Public License v3.0
1 stars 3 forks source link

Submodule groups are completely broken #32

Closed Cpt-Dingus closed 1 year ago

Cpt-Dingus commented 1 year ago

Another permissions issue that wasn't caught during testing, my bad. Same deal as #23


node:events:492
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read properties of undefined (reading 'permissions')
    at Client.<anonymous> (/home/meti/Documents/TuringBot/src/core/main.ts:175:45)
    at Client.emit (node:events:526:35)
    at InteractionCreateAction.handle (/home/meti/Documents/TuringBot/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12)
    at module.exports [as INTERACTION_CREATE] (/home/meti/Documents/TuringBot/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (/home/meti/Documents/TuringBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
    at WebSocketManager.<anonymous> (/home/meti/Documents/TuringBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:238:12)
    at WebSocketManager.emit (/home/meti/Documents/TuringBot/node_modules/@vladfrangu/async_event_emitter/src/index.ts:356:28)
    at WebSocketShard.<anonymous> (/home/meti/Documents/TuringBot/node_modules/@discordjs/ws/src/strategies/sharding/SimpleShardingStrategy.ts:32:47)
    at WebSocketShard.emit (/home/meti/Documents/TuringBot/node_modules/@vladfrangu/async_event_emitter/src/index.ts:356:28)
    at WebSocketShard.onMessage (/home/meti/Documents/TuringBot/node_modules/@discordjs/ws/src/ws/WebSocketShard.ts:565:10)
Emitted 'error' event on Client instance at:
    at emitUnhandledRejectionOrErr (node:events:397:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

Node.js v20.5.1
make: *** [Makefile:22: start] Error 1```
Cpt-Dingus commented 1 year ago

only the bug label since 99% of the bot works, submodule groups are only used like twice

Cpt-Dingus commented 1 year ago

image

Doesn't work even with permissions set.. weird

Cpt-Dingus commented 1 year ago

It's actually worse 1) Main.ts:L166 has no return statement, meaning the commande executes anyways 2) The L166 always gets triggered when it's a submodule group