mk3ext
mk3ext
Explore posts from servers
SIASapphire - Imagine a framework
Created by mk3ext on 9/28/2024 in #sapphire-support
addStringOption applyLocalizedBuilder
Hey, Is it possible to use localizedBuilder on the choices for addStringOption?
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) => applyLocalizedBuilder(builder, 'commands/help:name', 'commands/help:description').addStringOption(
(option) => applyLocalizedBuilder(option, 'commands/help:options.category', 'commands/help:options.category.description').addChoices(
{ name: 'commands/help:choices.general', value: 'general' },
{ name: 'commands/help:choices.profile', value: 'profile' },
)
)
);
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) => applyLocalizedBuilder(builder, 'commands/help:name', 'commands/help:description').addStringOption(
(option) => applyLocalizedBuilder(option, 'commands/help:options.category', 'commands/help:options.category.description').addChoices(
{ name: 'commands/help:choices.general', value: 'general' },
{ name: 'commands/help:choices.profile', value: 'profile' },
)
)
);
}
5 replies
DIAdiscord.js - Imagine an app
Created by mk3ext on 5/11/2024 in #djs-questions
Extending GuildMember
Hey, Is there a way to extend guildmember to implement custom methods?
7 replies
SIASapphire - Imagine a framework
Created by mk3ext on 4/22/2024 in #sapphire-support
Promise error sometimes on load - sapphire.js framework
Hey, Whenever I am starting my bot within a docker environment, I am getting this error sometimes;
2024-04-22 12:04:51 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 0 commands

2024-04-22 12:04:52 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 0 global commands

2024-04-22 12:04:52 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting guild application commands for guild xxxxx, now at 14 commands

node:internal/process/promises:289

triggerUncaughtException(err, true /* fromPromise */);

^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {

code: 'ERR_UNHANDLED_REJECTION'

}
2024-04-22 12:04:51 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting global application commands, now at 0 commands

2024-04-22 12:04:52 - INFO - ApplicationCommandRegistries(BulkOverwrite) Successfully overwrote global application commands. The application now has 0 global commands

2024-04-22 12:04:52 - DEBUG - ApplicationCommandRegistries(BulkOverwrite) Overwriting guild application commands for guild xxxxx, now at 14 commands

node:internal/process/promises:289

triggerUncaughtException(err, true /* fromPromise */);

^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {

code: 'ERR_UNHANDLED_REJECTION'

}
However it only occurs every now and again which exits then if I restart it works fine; any ideas?
4 replies