dan
Explore posts from serversSIASapphire - Imagine a framework
•Created by dan on 9/7/2024 in #sapphire-support
Support for bun
Does sapphire support bun out of the box? While trying to run the code (without compiling, aka directly through bun) I get multiple errors saying a compatible class export can't be found... I'm assuming this means the code has to be compiled first but If I'm wrong let me know.
7 replies
SIASapphire - Imagine a framework
•Created by dan on 9/3/2024 in #sapphire-support
Overriding message command listeners
Is it possible to virtually load a piece (listener) to override the default CorePreMessageParser? I'd prefer not to do this by adding it to my listeners folder but rather in my command manager
3 replies
SIASapphire - Imagine a framework
•Created by dan on 8/8/2024 in #sapphire-support
Application command registries
15 replies
SIASapphire - Imagine a framework
•Created by dan on 7/31/2024 in #sapphire-support
Registering multiple paths for pieces
I was wondering if it's possible to register multiple paths for sapphire's pieces (commands, listeners, preconditions, etc). The reason why I want to do this is because I override most of the core listeners to add my bot's customization options and I wanted to separate them
8 replies
SIASapphire - Imagine a framework
•Created by dan on 7/28/2024 in #sapphire-support
Global preconditions position seems to be broken
I overrode sapphire's default UserPermission precondition so I could add my own logic. This precondition specifically works fine and runs after the ones that have a position before it, however, I have another precondition that checks for channel permissions, and that one seems to run before this, even though it has a higher position
I can't tell if this is a bug or I'm doing something wrong but that's what is happening
3 replies
SIASapphire - Imagine a framework
•Created by dan on 7/26/2024 in #sapphire-support
Overriding default permission precondition
I'd like to use sapphire's core permission precondition but I want to modify it and add my own logic. By this I mean being able to use requiredUserPermissions in the command options.
Reading through the guide/docs It doesn't specify if you can override the core preconditions with your own (like you can with arguments) so I'm asking here for clarification
11 replies
SIASapphire - Imagine a framework
•Created by dan on 7/11/2024 in #sapphire-support
Assigning ID hints outside of builders
Is it possible to assign id hints outside of builders? Currently it's impossible to juggle id hints between the dev bot and the main bot and I was wondering if there's a way to do this outside of the builder, maybe before the client is initialized
8 replies
SIASapphire - Imagine a framework
•Created by dan on 7/7/2024 in #sapphire-support
Slash commands failing to register
I deleted my dist folder because I wanted to 'refresh' the compiled code, and right after I noticed that only 2 of my commands are registering now, them being escalation-manager and shortcut-manager. I don't get what went wrong since it was working fine earlier but maybe someone can shine some light into this?
13 replies
SIASapphire - Imagine a framework
•Created by dan on 7/6/2024 in #sapphire-support
Chat input command IDs
I have a function that needs to get the id of a chat input command to process some logic, and I was wondering how I could get the id? Obviously it's stored in container.stores.get('commands') but I don't know where to go from there.
7 replies
SIASapphire - Imagine a framework
•Created by dan on 7/4/2024 in #sapphire-support
Interaction create and custom commands
I have a system with shortcuts (basically a command that punishes a user with a defined reason and duration, e.g something like ,spam <user>) and I'm trying to port them to my sapphire bot, however, I'm unsure if adding an interaction create event for chat input commands would mess with sapphire's handlers. My guess is that It won't if it can't find a command that matches the name of a global command but I'd still like to make sure. Can anyone confirm this?
19 replies
SIASapphire - Imagine a framework
•Created by dan on 7/3/2024 in #sapphire-support
Errors and their listeners
In my commands when I want to throw an error I just use
throw '<message>'
and then send an embed with that error using the MessageCommandError event listener. This works fine however It also logs to my console, which is really annoying me. Is there a way to disable this?10 replies
SIASapphire - Imagine a framework
•Created by dan on 2/11/2024 in #sapphire-support
Argument examples
Are there any examples for duration arguments available? I'm struggling with duration arguments for punishments and am looking for something that would accept either a "permanent" string or a duration with the type of a string, e.g 1h, 30d, 1m
Iirc there was a plugin for this but I can't remember what the name is or where to find it.
10 replies
SIASapphire - Imagine a framework
•Created by dan on 12/31/2023 in #sapphire-support
Checking for flags in message commands
I'm trying to add a
--silent
flag which if present will make the punishment silent (the user won't get a dm). Is this possible through sapphire?9 replies