Aura
Aura
SIASapphire - Imagine a framework
Created by Aura on 5/22/2023 in #sapphire-support
How to Register a Discord Slash Command via Sapphire without creating a command file
First of All, I am doing this for a private bot.. so i don't care about other people exploiting the bot if the bot is restarted will sapphire load the command registered without creating a file automatically? if not what should be my other approach My specific problem I have a function called OnUpdateDb(Data) that runs as soon as specific things are added or updated in the database. Here is the structure of the Data object:
{
Name: string,
Description: string,
Js: (interaction) => {
// Actual code for the command
interaction.reply("This will be executed every time the command is used (after the command is registered on Sapphire and Discord).");
}
}
{
Name: string,
Description: string,
Js: (interaction) => {
// Actual code for the command
interaction.reply("This will be executed every time the command is used (after the command is registered on Sapphire and Discord).");
}
}
I want the onUpdateDb function to register the command to sapphire and make the command get loaded on sapphire during restarts
OnUpdateDb(Data){

}
OnUpdateDb(Data){

}
4 replies
SIASapphire - Imagine a framework
Created by Aura on 3/6/2023 in #sapphire-support
How Do I Make a Project in my current Directory?
12 replies