Sapphire - Imagine a framework
Sapphire - Imagine a framework

old-application-commands-and-interactions

Root Question Message

Vladdy
Vladdy10/8/2021
⚠️ How should you define what application commands are for what command classes, and how should they be registered for you? (SUPER IMPORTANT QUESTION)

1️⃣: Default by the command.name, otherwise command.chatInputName (for chat input commands) or command.contextMenuName for context menus, and provide a utility function on the command store that lets you register them if missing at ready (can go into more details if this option is chosen)
2️⃣: Passing in an array of @discordjs/builders in the command class's options, which get pushed to the API based on client settings (as above, with some options for handling existing commands and what not)
3️⃣: Propose a better solution
Vladdy
Vladdy10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Vladdy
Vladdy10/8/2021
That'd be an interface hell
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Vladdy
Vladdy10/8/2021
Thats again not even the question at hand
Vladdy
Vladdy10/8/2021
pls re-read
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Vladdy
Vladdy10/8/2021
well the third option is the "other" of forms that basically say "you say something else"
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
Vladdy
Vladdy10/8/2021
Yes
Message Not Public

Sign In and Join Server To See

10/8/2021
Vladdy
Vladdy10/8/2021
That's been answered in #894234449133322281 pretty sure-right no transcript
Vladdy
Vladdy10/8/2021
same folder
24
2410/8/2021
I like approach 2 more, seeing as DJS also has pushed people to use djs/builders
24
2410/8/2021
Option 1 seems easier in theory, but I think option 2 would be easier to implement and maybe better for people moving from DJS to sapphire
Vladdy
Vladdy10/8/2021
I dunno... putting builders in the command options is..gonna get big fast
24
2410/8/2021
this is true
24
2410/8/2021
I did enjoy how the setUp method that was theorized in the slash plugin accepted a builder, or was going to
Message Not Public

Sign In and Join Server To See

10/8/2021
24
2410/8/2021
if we only care about name in the options, no. 1 is best, but if we want to register the whole command, v2 seems best (more flexible) at the cost of the biggie constructor
Vladdy
Vladdy10/8/2021
close, you'd have a different function for chatInputCommands and contextMenuCommands @191257958431195146
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
24
2410/8/2021
run would likely be removed, no?
Vladdy
Vladdy10/8/2021
run is renamed to messageRun
Message Not Public

Sign In and Join Server To See

10/8/2021
Message Not Public

Sign In and Join Server To See

10/8/2021
24
2410/8/2021
you could just make a #private method that is called from both of the run methods
Vladdy
Vladdy10/8/2021
^
24
2410/8/2021
but the logic would be different (interaction.member, msg.member, ect) based on args
Favna
Favna10/8/2021
where do you want the votes? anyway 1️⃣
24
2410/8/2021
2️⃣
Vladdy
Vladdy10/8/2021
just in messages, I can figure out stuff
Vladdy
Vladdy10/8/2021
I personally want 1
24
2410/8/2021
wait we need a poll
Favna
Favna10/8/2021
@266624760782258186
Message Not Public

Sign In and Join Server To See

10/8/2021
Favna
Favna10/8/2021
s!poll Option 1, Option 2, Option 3 (please suggest)
24
2410/8/2021
ty
24
2410/8/2021
I think I'll be very much outvoted here
24
2410/8/2021
but I think both options are good approaches so I don't mind
Vladdy
Vladdy10/8/2021
it barely started lol
Vladdy
Vladdy10/8/2021
just wait
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy