Feralheart
Explore posts from serversSIASapphire - Imagine a framework
•Created by Feralheart on 4/9/2024 in #sapphire-support
Variable parameter type based on the previous variable
I want to add a 'parametric'
set
subcommand to one of my commands
For that command the values can be user, role or a string. Can I somehow change the option type (for example use addRoleOption
instead of addStringOption
) based on the value of the type
option?
8 replies
SIASapphire - Imagine a framework
•Created by Feralheart on 12/3/2023 in #sapphire-support
Linter errors in command options after upgrade
Hey there,
After upgrading to the freshest Sapphire and Discord.js versions I've got error in every command where I parse the options.
For example:
Here I got two errors in my linter:
Inside
.getChannel()
Expected 0 arguments, but got 1And at
.getString()
Property 'getString' does not exist on type 'Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">'The interesting thing is the errors are only inside my linter and in CLI it builds without any warns or errors. Did I forgot to add something or remove something from my
package.json
?18 replies
SIASapphire - Imagine a framework
•Created by Feralheart on 5/23/2023 in #sapphire-support
Bot doesn't trigger error events
I want to add error reporting to my bot and to test it I added two errors to my bot: a manually thrown one (calling
throw new Error('You've got an error!');
) and an E500 (in this case checking a property of a null object)
I've added the
But after triggering the "bad commands" there are no sign of these logs in console, just the errors
After trying it I've added Sentry and Rollbar (not simultaneously) to the project as well but the errors doesn't appear on the dashboard
Is there something in the framework what catches these errors?9 replies
SIASapphire - Imagine a framework
•Created by Feralheart on 1/22/2023 in #sapphire-support
@sapphire/result error in v4
After migrating to Sapphire v4 and D.js v14 and fixed all breaking changes, I've still got three errors from
@sapphire/result
One of the error is:
The other two looks the same but instead of UnwrapSome
there's UnwrapOk
and UnwrapErr
in the last row
How to fix this?19 replies
SIASapphire - Imagine a framework
•Created by Feralheart on 12/5/2022 in #sapphire-support
How to remove image from interaction reply when using a paginator?
When my bot replies with an embed and then edit it's reply to a paginator the image what was in the embed still remains above the paginator.
How to remove it?
6 replies