log(n)
log(n)
Explore posts from servers
SIASapphire - Imagine a framework
Created by log(n) on 3/30/2024 in #sapphire-support
no error event on subcommand precondition
what event fires when a Subcommand's precondition (on a subcmd, not the whole class) fails? i'm not getting it to SubcommandError or commandDenied
30 replies
SIASapphire - Imagine a framework
Created by log(n) on 3/30/2024 in #sapphire-support
apply precondition to only one Subcommand?
I was wondering if there's a decorator or something, or if I need to run the logic manually.
4 replies
DIAdiscord.js - Imagine an app
Created by log(n) on 1/5/2024 in #djs-questions
Guild .memberCount vs .approximateMemberCount?
What is the difference between a guild's memberCount and approx MC? I don't see a memberCount in the actual API-provided Guild, and additionally the approximate count is for some reason null? I have the Guilds & GuildMembers intents enabled which I presume are the needed ones.
11 replies
SIASapphire - Imagine a framework
Created by log(n) on 4/15/2023 in #sapphire-support
plugin-subcommands "No subcommand was matched"
I'm configuring my subcommand with:
@ApplyOptions<Subcommand.Options>({
name: "config",
subcommands: [
{
...
},
{
name: "logs",
entries: [
{ name: "on", chatInputRun: "chatInputLogsOn" },
{ name: "off", chatInputRun: "chatInputLogsOff" },
],
},
],
})
@ApplyOptions<Subcommand.Options>({
name: "config",
subcommands: [
{
...
},
{
name: "logs",
entries: [
{ name: "on", chatInputRun: "chatInputLogsOn" },
{ name: "off", chatInputRun: "chatInputLogsOff" },
],
},
],
})
No errors occur, but /config logs on (which yes, i have registered) spits out "UserError: No subcommand was matched with the provided command."
26 replies
SIASapphire - Imagine a framework
Created by log(n) on 4/14/2023 in #sapphire-support
Type-safety for guild-only slash commands
I understand that ChatInputCommandInteraction#guildId is nullable, but is there some sort of way to assert it's going to be run in a guild? I'm setting .setDMPermission(false) on the builder, do I need to .guildId! everywhere or is there a better method?
46 replies
SIASapphire - Imagine a framework
Created by log(n) on 4/13/2023 in #sapphire-support
Absolutely nothing happens with basic text command
I followed the Getting Started and setting up a basic command steps to no avail, I simply see 'took 0ms to initialize' and running '@<the bot> ping' does nothing. main is set to dist/index.js and I'm using TS if that affects anything.
44 replies