SIA
Sapphire - Imagine a frameworkMRDGH2821
APIInteractionDataResolvedGuildMember does not have id
While fetching for member using
interaction.options.getMember('member')
it gives two types - GuildMember|APIInteractionDataResolvedGuildMember
out of which the second one literally doesn't have member's snowflake ID
I saw this https://discord-api-types.dev/api/discord-api-types-v10/interface/APIInteractionDataResolvedGuildMember and confirmed that it really doesn't have id
field
How am I supposed to fetch such a member (basically type guard the member)?
My package.json
M
MRDGH2821•400d ago
I could definitely do this -
But I want to keep this as last resort.
F
Favna•400d ago
Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.2KMembers
View on DiscordWant results from more Discord servers?
More PostsAPI Client with SSL?Hey guys,
currently I am trying to make the switch from an custom express API to the API plugin. IsContext Menu Command and Subcommand cannot be in same extended class?I have a slash command which is an extended `Subcommand` called `give-role` with two subcommands - `UserErrors not being caught by listener - bot is crashingmessageCommandError.mjs
```js
import { Events, Listener } from "@sapphire/framework";
import { send Subcommand isn't runningWhen the subcommand is run in Discord, it times out. I've added a log to the beginning of the methodHow to properly handle UserErrors?I'm using the official sapphire template and want to throw a UserError inside a context menu commandCan I set different requiredUserPermissions for each subcommand?Just wondering if this is possible, and how. ThanksHandling BulkOverwrite Registry ErrorsWhen I encounter this error
```
[ERROR] ApplicationCommandRegistries(BulkOverwrite) Failed to overwrEvents for VoiceHow can I do something like the following but for voice?
```
import { Listener } from '@sapphire/frHow do I use autocompleteRun on subcommands?^ As the title says. I can't seem to figure out how subcommands can have autocompleteRun implementedMessage editing fails even though message can be fetchedWhenever I want to edit an ephemeral message I get the following error:
```js
[ERROR] Encountered er