sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
error TS5109: Option 'moduleResolution' must be set to 'Node16'
error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
...Broken TypeScript command (from lack of knowledge of TS)
@sapphire/discord.js-utilities - isPrivateThreadChannel
isPrivateThreadChannel
. Shouldn't that type-guard instead of being ThreadChannel
be PrivateThreadChannel
```typescript
import { container } from '@sapphire/framework'
import type { PrivateThreadChannel, Snowflake } from 'discord.js'...Custom Error Event
UserError
to throw an error if the user did something wrong.
But what to throw if something unexpected happend, like a 500 to my own api.
I thought maybe the normal Error
but it isn't handled by the ChatInputCommandError
Event.
I want the user to get a error message in chat, so I need to use the interaction...."There are no more arguments." using args.pick('integer')
value
```js
let value = await args.pick('integer').catch((err) => console.log('Volume ::', err.message));
...Blacklist Command
Precondition issue
messageCreate issue
Listeners question
"Maximum number of application commands reached" but hitting the API returns an empty array?
Failed to overwrite global application commands DiscordAPIError[30032]: Maximum number of application commands reached (5).
So I went through the process of deleting all the global application commands by hitting /applications/{application.id}/commands
and copying down the ids of each command, then hitting /applications/{application.id}/commands/{command.id}
.
However, I'm still seeing the "Failed to overwrite global application commands" message when starting my bot. I double-checked /applications/{application.id}/commands
and it's returning an empty array so I don't have any global application commands according to the API, and I know that I don't have 5 context menu commands (I counted them, it's 3 actually) so I'm not sure what exactly it's complaining about? I've attached guildIds
options to each of my commands so I feel like that can't be the issue? I feel like I'm missing something but I'm not sure what it could be....Post examples
How do I check if the user ID is actually equals to the user ID in interaction-handlers
if (interaction.user.id !== <command_user>.user.id)
Button handler is not calling parse method
Did the latest @sapphire/[email protected] update break things?
pnpm update
. The typings for the i18n entry in SapphireClient also disappeared. Reverting to 5.0.4 seems to fix the issue. Has anyone else encountered this?...Spaced options with @sapphire/lexure
subcommand name
Registries behaviour
Async Preconditions
The inferred type of 'chatInputRun' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@sapphire/result'. This is likely not portable. A type annotation is necessary.
Here is the code in question:
```ts
public override async chatInputRun(interaction: Interaction) {...