Lioness100
Lioness100
Explore posts from servers
SIASapphire - Imagine a framework
Created by čamdžić on 8/10/2024 in #sapphire-support
env/join not working properly
In the future, please don't tag anyone immediately
13 replies
SIASapphire - Imagine a framework
Created by čamdžić on 8/10/2024 in #sapphire-support
env/join not working properly
Please send your code
13 replies
SIASapphire - Imagine a framework
Created by ./Ticker on 5/6/2024 in #discordjs-support
Question about developing in TypeScript
Not sure what you mean about performance. Obviously it adds a build step, but it's just a few seconds
8 replies
SIASapphire - Imagine a framework
Created by ./Ticker on 5/6/2024 in #discordjs-support
Question about developing in TypeScript
By structure I mean what x function expects and returns, what properties are on y, what parameters are in z callback, etc
8 replies
SIASapphire - Imagine a framework
Created by ./Ticker on 5/6/2024 in #discordjs-support
Question about developing in TypeScript
Yes, Typescript for me is a life saver! I no longer have to keep the structure of my entire application in my head and at the whims of my memory, + it makes me think harder about how i design things which makes them more scalable in the long term
8 replies
SIASapphire - Imagine a framework
Created by Indium on 4/23/2024 in #sapphire-support
Error please help
I'm not sure if this is your error, but you need to add subcommands to the builder. Ex:
registry.registerChatInputCommand(builder => builder
.setName('sollicitatie')
.setDescription(this.description)
.addSubcommand(builder => builder
.setName('marketing')
// ...
)
, { behaviorWhenNotIdentical: RegisterBehavior.Overwrite }
);
registry.registerChatInputCommand(builder => builder
.setName('sollicitatie')
.setDescription(this.description)
.addSubcommand(builder => builder
.setName('marketing')
// ...
)
, { behaviorWhenNotIdentical: RegisterBehavior.Overwrite }
);
29 replies
SIASapphire - Imagine a framework
Created by willow 🌷 on 2/22/2024 in #sapphire-support
How to reference client in main file?
Make sure the client has logged in first, or you won't be able to access any users. Consider doing whatever you're doing in the ready event?
8 replies
SIASapphire - Imagine a framework
Created by Birthday Hyper on 2/7/2024 in #sapphire-support
Precondition Command
The command is the second parameter of the run function. Example: https://github.com/sapphiredev/framework/blob/main/src/preconditions/Enabled.ts
7 replies
SIASapphire - Imagine a framework
Created by hoshino fumo on 1/20/2024 in #sapphire-support
Would there be a way to make a command list?
Adding to what Favvy said, to display all commands, you can use this.store to get a collection of the commands. You can then map them and utilize their name and description properties. Ex:
const display = this.store.map((command) => {
return `\`!${command.name}\` - ${command.description}`;
});
const display = this.store.map((command) => {
return `\`!${command.name}\` - ${command.description}`;
});
7 replies
SIASapphire - Imagine a framework
Created by Jarvo on 1/20/2024 in #sapphire-support
Clear Command Cache?
It overwrites all of your commands with the latest data
11 replies
SIASapphire - Imagine a framework
Created by Jarvo on 1/20/2024 in #sapphire-support
Clear Command Cache?
You should set add this line to your index file before you log in, which will overwrite all commands each time.
import { SapphireClient, container, ApplicationCommandRegistries, RegisterBehavior } from '@sapphire/framework';

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
import { SapphireClient, container, ApplicationCommandRegistries, RegisterBehavior } from '@sapphire/framework';

ApplicationCommandRegistries.setDefaultBehaviorWhenNotIdentical(RegisterBehavior.BulkOverwrite);
11 replies
SIASapphire - Imagine a framework
Created by Songbird on 1/9/2024 in #sapphire-support
Proper way to setup ESLint
Store<any>
24 replies
SIASapphire - Imagine a framework
Created by Songbird on 1/9/2024 in #sapphire-support
Proper way to setup ESLint
yes it does
24 replies
SIASapphire - Imagine a framework
Created by -Carlos🎃 on 1/3/2024 in #sapphire-support
Memory Leak
I'm out of ideas without the code or the full error
13 replies
SIASapphire - Imagine a framework
Created by -Carlos🎃 on 1/3/2024 in #sapphire-support
Memory Leak
Maybe you have too many awaitMessageComponent calls you didn't add a time property too for auto-clearing
13 replies
SIASapphire - Imagine a framework
Created by -Carlos🎃 on 1/3/2024 in #sapphire-support
Memory Leak
What's the stack trace for that
13 replies
SIASapphire - Imagine a framework
Created by -Carlos🎃 on 1/3/2024 in #sapphire-support
Memory Leak
Could you show the stack trace?
13 replies
SIASapphire - Imagine a framework
Created by hoshino fumo on 1/3/2024 in #sapphire-support
Class constructor _Listener cannot be invoked without 'new'
Can you send your code? @doqe
11 replies
SIASapphire - Imagine a framework
Created by Xeno™ on 1/2/2024 in #sapphire-support
Sapphire's approach to components
(#2 mojo
7 replies
SIASapphire - Imagine a framework
Created by Xeno™ on 1/2/2024 in #sapphire-support
Sapphire's approach to components
If you mean a scenario where the bot would reply with a component and then listen to that, I'd recommend either: 1. If something simple like a Yes/No button, just use message.awaitMessageComponentInteraction 2. If inputs result in completely separate functionality like Singleplayer vs Multiplayer, stringify all necessary state and add it to the custom ID, then parse it out in separate interaction handlers
7 replies