sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
Issue with listeners, not emitting
global preconditions
messageCreate
event goes thru even though i'm sending a message in the bot's DMs and I have a if (!message.guild) return;
at the top of the codeissue with code
message.member
is defined, the error was also logged 3 times for some reason
Code: https://pastebin.com/WWMVCewy
Error:...Accidentaly registered duplicate context menu commands
PLEASE HELPPPP...
Error with the framework's code (appearantely)
General question on timer-manager and stopwatch
Replacing Logger
Minor error in the documentation
autocompleteRun
and not autoCompleteRun
....Does subcommand methods have context parameter?
How can I remove a subcommand check?
switch
that handle different subcommands, but I need to include a check for the subcommand in the helper function itself. Is there a way I can avoid needing to do this check?Precondition error type
Events
from sapphire, you can use that
as for the parameter types.. sadly TS doesn't let us strictly type that to the point where you don't need to specify the actual types (i.e. it's inferred) (we really would want to!) but if you use Listener<typeof Events.GuildCreate>
then in your run
you have parameters of incorrect types, TS will tell you this....Accessing all commands array
client.application.commands
: https://old.discordjs.dev/#/docs/discord.js/main/class/ApplicationCommandManager...Bot throws error even though i declared my precondition already in the Preconditions interface
guild.roles.everyone but for boosters?
guild.roles.everyone
version for the booster role?Sapphire json Configuration
Commands not respecting cooldown preconditions
contextMenuCommandDenied question
contextMenuCommandDenied
listener is triggered?error: Error, payload: ContextMenuCommandDeniedPayload
So to get the interaction you then do payload.interaction
and the guild therefore is payload.interaction.guild
When programming it is always important to adhere to the parameter order and parameter types when writing and using functions. You should always consult documentation, and if working with a library like discordjs or framework like sapphire you’d also do well to refer to the source code, which gets linked for every symbol in the documentation....question
contextMenuCommandRun
return?
and is there a way of getting the user id of the user who ran the context menu?...Multiple command exports from a single file.
translate replys of sapphire like cooldown