net-tech-
Explore posts from serversDIAdiscord.js - Imagine an appCDCloudflare DevelopersLSLurkr SupportSIASapphire - Imagine a frameworkBSBuape StudiosPPrismaDTDrizzle Team
SIASapphire - Imagine a framework
•Created by net-tech- on 3/12/2024 in #sapphire-support
Using JSON to register application commands and add options
Hi there,
Is there a way to add all of my application command options in the
registerApplicationCommands
method on the Command
class without using builders?
For example, a registerApplicationCommands method might look like this currently, to register options:
---
My use case is that I have a constant array of settings I'd like the user to be able to configure, and it would be nice if I could do something like automatically add a non-required slash command option for each setting. Then the command could look something like /settings set setting1 setting2 setting3 ...
6 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 12/23/2023 in #sapphire-support
Removing pagination buttons on last page
Hi there, what is the recommended way to remove the pagination buttons on the last page when using the paginator in sapphire djs utilities?
4 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 8/6/2023 in #sapphire-support
Unknown interaction with paginated message custom actions
Hi there,
I'm using sapphire's paginated messages from
@sapphire/discord.js-utilities
. Before adding custom actions, a stop button worked fine. I recently set custom actions to:
Now, when I click the stop button. I get a djs error in the console:
Am I not stopping the paginator correctly?7 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 7/16/2023 in #sapphire-support
Trouble with telling typescript the return type of fetch when using @sapphire/result
Hi there,
I have a function that fetches an API using the native
fetch
function. The fetch
is wrapped in Result.fromAsync()
, and I wanted to do Result.fromAsync<Promise<APIResponse>>
since I know what the API will return. The problem is, when doing Result.fromAsync<Promise<APIResponse>>
Typescript says that Response
is missing certain properties that I know the API will return.
How would I tell Typescript I know that the fetch will return this?
15 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 7/13/2023 in #sapphire-support
'Can't find the template.' on a template listed in the docs
When running
sapphire generate buttoninteractionhandler customRole
I get the error Can't find the template.
, however, https://www.sapphirejs.dev/docs/Guide/CLI/generating-components lists buttoninteractionhandler
as a component.4 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 4/20/2023 in #sapphire-support
What does sapphire's logger use on the backend?
Winston, pino, something else?
10 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 4/2/2023 in #sapphire-support
Proper pnpm support
I keep getting
in any situation where I use
which the docs use in multiple examples. A quick search reveals that the suggested solution is adding
however this does not resolve the issue.
If the issue is indeed from pnpm's side, couldn't a maintainer of sapphire open an issue in
pnpm
's git repo about this since it's a pretty big thing? It seems a bit ignorant to tell the user to "switch to yarn" if they use pnpm. pnpm is a pretty popular choice, with over 3 million weekly downloads.
Normally I would open an issue on pnpm
's repo. However, I don't really have deep enough technical knowledge as to what exactly is happening to open a good bug report.6 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 3/14/2023 in #sapphire-support
Monorepos
Does Sapphire work and play nice with monorepos?
6 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 3/6/2023 in #sapphire-support
Interaction Handlers
Am I required to specify to sapphire where my interaction handlers directory is? A
interaction-handlers
directory doesn't seem to be detected.
- ├─ Loaded 0 interaction-handlers.
29 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 1/9/2023 in #sapphire-support
ChatInputCommandError Event not firing
I'm having trouble with this code https://hst.sh/odutopaniv.typescript in that the event is not firing when a command errors and this is being logged by sapphire natively https://hst.sh/ivezicirex.apache
6 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 1/9/2023 in #sapphire-support
What does commandError emit?
I'm struggling to find what
commandError
emits when fired by sapphire.12 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 1/9/2023 in #sapphire-support
Am I doing this wrong? I feel like I'm doing this wrong.
Hey there,
In my ping command I'm doing
void interaction.reply(await resolveKey(interaction, "ping:success", { ping }))
because I'm using eslint and it is screaming when not using void
. Is this a good way of handling the eslint error or is there a better one. resolveKey
is from @sapphire/plugin-i18next
and the eslint config is from @sapphire/eslint-config
.5 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 1/8/2023 in #sapphire-support
Namespace 'Command' has no exported member 'ChatInputInteraction'.
Hey there,
I'm following the guide at https://www.sapphirejs.dev/docs/Guide/getting-started/creating-a-basic-app-command, and I'm getting the error
Namespace 'Command' has no exported member 'ChatInputInteraction'.
on this line.
Intellisense offers me autocomplete for Command.ChatInputCommandInteraction
. Is this a mistake in the guide?8 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 1/8/2023 in #sapphire-support
Dockerfile - CLI Template
5 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 12/31/2022 in #sapphire-support
Does sapphire work only with DJS?
Would sapphire be compatible with something like Eris?
24 replies
SIASapphire - Imagine a framework
•Created by net-tech- on 11/30/2022 in #sapphire-support
Type 'DeveloperOnly' is not assignable to type 'PreconditionEntryResolvable'.
in
src/commands/eval.ts
. With a precondition file at src/preconditions/DeveloperOnly.ts
with the content https://hst.sh/ufunolenip.typescript . index.d.ts
exists with the following content https://hst.sh/gikuhixani.typescript . Eval starts with the content https://hst.sh/sagivaqahe.typescript .
Version @sapphire/framework@pr-512
34 replies