abalabahaha / eris

A NodeJS Discord library
https://abal.moe/Eris/
MIT License
1.49k stars 418 forks source link

Using slash command auto complete in forums channels throw an error #1512

Open flav-code opened 5 months ago

flav-code commented 5 months ago
[CLUSTER 0] [bot_630329110388015104] [SHARD 0] has an Error ! Error: Missing object id
    at Collection.update (/dev-bot/node_modules/eris/lib/util/Collection.js:31:19)
    at new AutocompleteInteraction (/dev-bot/node_modules/eris/lib/structures/AutocompleteInteraction.js:47:45)
    at Interaction.from (/dev-bot/node_modules/eris/lib/structures/Interaction.js:43:24)
    at Shard.wsEvent (/dev-bot/node_modules/eris/lib/gateway/Shard.js:2685:60)
    at Shard.onPacket (/dev-bot/node_modules/eris/lib/gateway/Shard.js:415:26)
    at Shard._onWSMessage (/dev-bot/node_modules/eris/lib/gateway/Shard.js:2815:29)
    at WebSocket.emit (node:events:519:28)
    at WebSocket.emit (node:domain:488:12)
    at Receiver.receiverOnMessage (/dev-bot/node_modules/ws/lib/websocket.js:1209:20)
    at Receiver.emit (node:events:519:28)
bsian03 commented 5 months ago

This doesn't look like it's specific to forum channels or autocomplete interactions (although I haven't actually checked the payload for autocomplete interactions so can't confirm). However it does look like member id isn't sniped when either the channel/guild isn't cached. @JustCat80 was there a specific reason why in your PR #1280 id is being sniped only if the channel contains a guild and not when it checks whether client contains the guild instead?

JustCat80 commented 5 months ago

Honestly I don't remember, but it's not unlikely I forgot or added the member id line in later and never ran into an uncached guild during testing