Context Menus not running
When I try to execute a Context Menu, it says "The application did not respond", no errors in console
30 Replies
Try going into sapphire source code in your node_modules folder and place console.log checkpoints throughout to see where the request fails internally.
Also make sure you're listening to the contextMenuCommandError event (it might be called something slightly different)
while your at it, subscribe to all of the following events: https://github.com/sapphiredev/framework/blob/ee939c7cf3d07a93f27b0d1aeef4a563a254619b/src/lib/types/Events.ts#L360-L418
GitHub
framework/src/lib/types/Events.ts at ee939c7cf3d07a93f27b0d1aeef4a5...
Discord bot framework built on top of discord.js for advanced and amazing bots. - sapphiredev/framework
if you do that you probably won't have to follow my first suggestion
possibleContextMenuCommand
got triggeredNone of the others? If so, you should go into the source code between that event and the next one to narrow down the cause.
it says "Emitted when the name of a sent context menu command does not match any loaded commands." but im sure it's loaded
@lioness100
[ERROR] Context Menu Command Denied PreconditionError: The precondition "Blacklist" is missing a "contextMenuRun" handler, but it was requested for the "userinfocontextmenu" command.
i'm not even using preconditions on these context menushttps://discord.com/channels/737141877803057244/1139735363619917834
Same problem as that then
global preconditions are always provided
Oooh that
they're called global for a reason
any way of disabling them on context menus
Make your preconditions extend
AllFlowPreconditions
so TS alerts you to implement all methods
noJust create a contextMenuRun function that does nothing but return this.some()
global is global
Or whatever preconditions return I forget
if you dont want global then dont use global
and yeah what lioness said
this.ok()?
if we provided global and then filters for that then it would be counter intuitive for them to be global
Then you'd be making preconditions for
yo dawg I herd u likez precondtions so I put preconditions on your preconditions
jokes aside that would be textbook overengineering
?
also tried with return this.some() but also didn't work
yes
make sure to recompile TS
Lol why didn't ts warn you against .some
oh wait hes writing JS i think
(ew)
yes
very lazy to switch to ts
TS lets you be more lazy fuo
fyi
You should still follow your text editor's autocomplete instead of trusting me 😎
in all seriousness I'm 99% sure you'd have far farr less issues than you do now if used TS. You've had to create a LOT of support threads the past few days which isn't bad per se at all, but I think with TS support you wouldn't have had to do as many.
¯\_(ツ)_/¯
i mean i pretty much finished the rewrite of the bot
anyways it worked, hope there are no errors now