sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
TypeError: import_undici4.FormData is not a constructor
I get this error : TypeError: import_undici4.FormData is not a constructor
when i try to send an attachment
Code :
```js...
typescript error
why am i getting these errors
**error TS2503: Cannot find namespace 'ChatInputCommand'.
9 public override registerApplicationCommands(registry: ChatInputCommand.Registry) {...
What is cached?
I can't seem to find a solid answer for this, what is always cached by discord js on startup and what needs to be fetched? Right now my understanding is guilds and channels are always cached, while members should be fetched always. Not sure about roles
Disabling button received from Button Interaction Handler
Is it possible to disable button interaction received via interaction handler?
Something like -
interaction.buttonComponent.disable()
Or do I have to recreate the same button & use interaction.update()
?...Does not send embed in thread, does not throw error, does not log anything
https://github.com/MRDGH2821/Perpetual-Mechanical-Array-Bot/blob/rewrite-sapphire/src/damageLeaderboard/listeners/LBPostRegister.ts#L77
My bot is able to execute the run method in this listener, but somehow it doesn't run
sendLogs
method defined in the listener class....Embed Edit command.
Hello, there!
I have one problem, i want /embed-edit "messageid" "atributes" command, but i dont know, how to make it. Please, any solution, how to make simply and fast? :/ Thanks...
Handling modal submissions
What Is the correct way to handle modals?
https://github.com/MRDGH2821/Perpetual-Mechanical-Array-Bot/blob/rewrite-sapphire/src/baseBot/commands/confess.ts#L207
I tried this way, but the logs throw Unknown Interaction error. So I definitely know this is incorrect way to do. ...
Having trouble with components
I'm trying to update Discord.js from 13 to 14, but I'm having trouble with components. TS is complaining about a missing type field in row, but adding it does nothing. What am I doing wrong?
```ts
const row = new ActionRowBuilder({
components: [
new ButtonBuilder({...
Nested message component collectors
How should I be handling nested message component collectors?
What the best way to do it...
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)?...Error server
How can I solve this error ?
```
Error [ERR_SERVER_ALREADY_LISTEN]: Listen method has been called more than once without closing.
at __node_internal_captureLargerStackTrace (node:internal/errors:477:5)...
How big is the difference between xyz.cache.get() and await xzy.fetch()?
fetch returns the cached thing aswell if it exists, so except the Promise difference i see not really a problem with using await fetch all the time. Is this consider bad practise? & How big is the difference time & performancewise?
Throwing on unhandled interaction
Hey, I just wanted to quickly check this idea - If I assign a listener to interaction create and then set a 4 second timeout, if the interaction hasn't been deferred or replied to I can log an error right?
Command info command issue
I have a command info command, but when I try to get information on a command called "flags" it returns this error:
```js
at ArrayValidator.handle (C:\Users\cmart\Desktop\Sapphire\node_modules@sapphire\shapeshift\dist\index.js:457:70)
at ArrayValidator.parse (C:\Users\cmart\Desktop\Sapphire\node_modules@sapphire\shapeshift\dist\index.js:201:88)...
Docker being goofy
I have no idea why Docker is being all goofy, it's saying that my discord token is invalid, but it's not the case. I did reset the token just in case, and the error still persists.
I'm wondering if anyone else has come across a similar problem and how they fixed it
https://juan.evaded.tax/i/fb088.png...
interaction.showModal not working
interaction.showModal doesnt work, I dont know why.
Code:
``
this.container.logger.debug("Start Editing...")
const modal = new ModalBuilder().setTitle("Nachricht bearbeiten").setCustomId(
modaledit${swallowed.id}`)...