xAfflict
xAfflict
SIASapphire - Imagine a framework
Created by xAfflict on 6/15/2023 in #sapphire-support
Add Choices To An Already Registered Command
Is there any way to add choices to an already registered command? For example, say I have a command that allows a user to add a fruit to a list. Then I have another command that allows the user to take the fruit off the list. I want to be able to update the choices in the command every time the user adds or removes a fruit. Is this possible with Sapphire?
8 replies
SIASapphire - Imagine a framework
Created by xAfflict on 5/10/2023 in #sapphire-support
Is it possible to run the same bot multiple times and have them each independently handle commands?
I was wondering if I can just run multiple instances of the same bot and have them handle commands on a per channel basis. Each instance of the bot would have it's own config that tells it what channel it can respond to commands in. I was able to achieve this in discord-akairo (old discord framework) with message commands, but I don't know if this would work with interaction commands.
29 replies
SIASapphire - Imagine a framework
Created by xAfflict on 4/18/2023 in #sapphire-support
Custom Command Cooldown Message
So the default message is something like: There is a cooldown in effect for this chat input command. It'll be available at 2023-04-19T04:26:08.886Z. Is there any good way to turn this message into something more readable and convenient, such as: This command cannot be used for *X* hours / *Y* minutes. Is there a way to extract the cooldown for the command itself? So I can get a date or time object out of it?
4 replies
SIASapphire - Imagine a framework
Created by xAfflict on 4/8/2023 in #sapphire-support
Disable And/Or Change Listeners Directory
Is there a way to change the default name of the listeners directory? If not, is there a way to completely disable automatic registration of the listeners? If there is, how do you register them manually?
6 replies
SIASapphire - Imagine a framework
Created by xAfflict on 4/7/2023 in #sapphire-support
ChatInputCommandDenied listener not working
https://hastebin.skyra.pw/zegacopaje.ts (Listener) https://hastebin.skyra.pw/umabaligoc.ts (Precondition) https://hastebin.skyra.pw/yosaqacezi.ts (Example Command) https://hastebin.skyra.pw/oxofukofew.ts (Main) I've been following the guides and I've created a precondition, put it on a command, and it works. My issue is that when the precondition is not satisfied, the listener is not being triggered. The precondition itself is working, but I am still getting the default "the application did not respond" rather than my error message.
9 replies
SIASapphire - Imagine a framework
Created by xAfflict on 4/6/2023 in #sapphire-support
Slash Command User Arg Always Failing
10 replies
SIASapphire - Imagine a framework
Created by xAfflict on 2/12/2023 in #sapphire-support
Commands not responding to defaultPrefix
I've setup the defaultPrefix to "!":
const client: SapphireClient = new SapphireClient({
"intents": [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
"loadMessageCommandListeners": true,
"defaultPrefix": "!"
});
const client: SapphireClient = new SapphireClient({
"intents": [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
"loadMessageCommandListeners": true,
"defaultPrefix": "!"
});
For some reason though, the bot won't respond when I use that prefix. It only responds to the command when I mention it. Am I misunderstanding what the defaultPrefix option does?
5 replies
SIASapphire - Imagine a framework
Created by xAfflict on 2/11/2023 in #sapphire-support
How To Use The Enum Arg?
Hello, I'm trying to use the enum arg in order to accept only one of two strings. How does one pass in the acceptable options for the enum? Could someone provide me with an example?
5 replies