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
Lioness100
Lioness100•9mo ago
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)
Lioness100
Lioness100•9mo ago
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
Lioness100
Lioness100•9mo ago
if you do that you probably won't have to follow my first suggestion
-Carlos👑
-Carlos👑•9mo ago
possibleContextMenuCommand got triggered
Lioness100
Lioness100•9mo ago
None of the others? If so, you should go into the source code between that event and the next one to narrow down the cause.
-Carlos👑
-Carlos👑•9mo ago
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 menus
Favna
Favna•9mo ago
global preconditions are always provided
Lioness100
Lioness100•9mo ago
Oooh that
Favna
Favna•9mo ago
they're called global for a reason KEKW
-Carlos👑
-Carlos👑•9mo ago
any way of disabling them on context menus
Favna
Favna•9mo ago
Make your preconditions extend AllFlowPreconditions so TS alerts you to implement all methods no
Lioness100
Lioness100•9mo ago
Just create a contextMenuRun function that does nothing but return this.some()
Favna
Favna•9mo ago
global is global
Lioness100
Lioness100•9mo ago
Or whatever preconditions return I forget
Favna
Favna•9mo ago
if you dont want global then dont use global and yeah what lioness said
Lioness100
Lioness100•9mo ago
this.ok()?
Favna
Favna•9mo ago
if we provided global and then filters for that then it would be counter intuitive for them to be global
Lioness100
Lioness100•9mo ago
Then you'd be making preconditions for kekw
Favna
Favna•9mo ago
yo dawg I herd u likez precondtions so I put preconditions on your preconditions jokes aside that would be textbook overengineering
-Carlos👑
-Carlos👑•9mo ago
async contextMenuRun() {
return this.ok();
}
async contextMenuRun() {
return this.ok();
}
? also tried with return this.some() but also didn't work
Favna
Favna•9mo ago
yes make sure to recompile TS
Lioness100
Lioness100•9mo ago
Lol why didn't ts warn you against .some
Favna
Favna•9mo ago
oh wait hes writing JS i think (ew)
-Carlos👑
-Carlos👑•9mo ago
yes very lazy to switch to ts
Favna
Favna•9mo ago
TS lets you be more lazy fuo fyi
Lioness100
Lioness100•9mo ago
You should still follow your text editor's autocomplete instead of trusting me 😎
Favna
Favna•9mo ago
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.
-Carlos👑
-Carlos👑•9mo ago
¯\_(ツ)_/¯ i mean i pretty much finished the rewrite of the bot anyways it worked, hope there are no errors now
Lioness100
Lioness100•9mo ago
this