#channel.isTextBased is not a function
1 messages · Page 1 of 1 (latest)
it would be good to know what this function is supposed to do. if we could just patch something in as a quick fix so our shards don't keep crashing
Added a console.log into the file
type: 0,
permissions: '1020091952705',
parent_id: '776866311689994250',
name: 'de_closed-5392',
id: '1079804400308068352'
}
It checks whether the action came from a text channel
The guard is checking whether this (the message) has the property "messages"
yeah i'm trying to just quickly patch it in node_modules tbh so my users don't rage out... i think i will just change the function call to && !channel.messages
in my case a channel is needed since it's for a context menu message command
removing partial channels intent, seeing if that helps.
Didn't help.
Possible fix
discord saying they're reverting the change
source?
Private channel for large bot devs -> #801246036906606622
oof no access
think we just hold out and wait boys
there is probably some propagation time for the revert to hit
even if there was no rollback it'd be wisest to wait anyway since d.js team would be working on a fix
yeah depending on the bot size it was pretty bad though, shards crashing every 10 seconds over here
We have no confirmation it's in progress, only that they need to revert it.
Seems it's not crashing anymore
issue still present tho
You are correct.. sorry
I just added a basic check to prevent the crash until discord fixes the api
but atleast I can start things up ahead of time.
hey @graceful pebble, your fix working out? might implement if the crashes don't stop soon (they seem to have slowed down)
not really sure about the code tho, does the rest work fine with the return? Since you are prematurely ending the execution of the function
so the interactionclass is not defined
I'd prolly just add a check to see if isTextBased is defined
prolly something like channel && !channel.isTextBased?.() (not tested, going to sleep)
that's basically optional chaining for function calls (checks if the property is defined and tries to call it like a function if it's defined)
That's what I did
You just added an extra check that inverts the meaning
Oh nvm