Poll Discussion & Answers

1️⃣ → Interaction Handler 2️⃣ → In the command with the same name / id 3️⃣ → Other (please explain in thread)
39 Replies
bitomic
bitomic4y ago
sorry, what's the interaction handler?
vladdy
vladdy4y ago
Vlad Frangu's Notion on Notion
Handling Interactions (not Application Commands) in Sapphire
For a long time, the demand for interaction handlers in Sapphire has grown exponentially with time! The good news is that I finally have something to show you, and I think this will allow for some super clean code on your side!
Favna
Favna4y ago
Wow I was gonna vote interaction handler but I'm being mega outvoted so far. Maybe I just don't grasp autocomplete properly yet.
vladdy
vladdy4y ago
you can vote that if you want
Favna
Favna4y ago
Yeah I know of course
vladdy
vladdy4y ago
the TL;DR is: autocompletes are currently for chat input string/number args
bitomic
bitomic4y ago
I was first going to vote (2) but I didn't know/remember what (1) was
Lioness100
Lioness1004y ago
I just think it would be more readable to have a very relevant handler in the class
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Favna
Favna4y ago
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
vladdy
vladdy4y ago
It's for the autocomplete interactions, where if you have an argument that can return completions based on input, where should it go, in the same command class or elsewhere
𝖄𝖚𝖌𝖊𝖓
I did 3 cause I want to kinda support both, I can understand in command handling for ease of use, but more generic ones (like auto complete on usernames??) you want those on a simple handler so you don't redo code
RedS
RedS4y ago
omegalul
vladdy
vladdy4y ago
My worry is that cramming it in the command class will make it..messy
𝖄𝖚𝖌𝖊𝖓
but if I had 1 choice, I'd choose 2
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Favna
Favna4y ago
advaith (@advaithj1)
AdvaithBot, Slashtags, and Dictionary now support autocomplete, one of the new features shown during Thursday's DDevs stage event!
From advaith (@advaithj1)
Twitter
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Favna
Favna4y ago
Both will be code chaos
𝖄𝖚𝖌𝖊𝖓
I kinda don't want just 2 to win lol
vladdy
vladdy4y ago
I mean I would make it support both but then you end up with.. "have I replied in the command class..or in the interaction handler...do i handle both???"
Favna
Favna4y ago
snek's Notion on Notion
Application Command Option Autocomplete Interactions
At present applications must pre-define all possible options when accepting input from users. We want to enable applications to dynamically populate options in slash commands, which would allow for more use-cases (like building a simple search or supporting many choices).
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
𝖄𝖚𝖌𝖊𝖓
if in command exists -> command, else handler command first, then handler
vladdy
vladdy4y ago
HMMMMMMMM
RedS
RedS4y ago
require both mmLOL
vladdy
vladdy4y ago
Intriguing
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Sean
Sean4y ago
do it both ways. Have it call the same function or smth
vladdy
vladdy4y ago
This could be a way to do it, not my favorite at all but definitely cleaner than I thought Makes sense I suppose, freedom of choice and all
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
vladdy
vladdy4y ago
I just want to avoid possible "you shot yourself in the foot, what did you expect to happen"
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
𝖄𝖚𝖌𝖊𝖓
It's either that or define it
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
vladdy
vladdy4y ago
See pins
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
vladdy
vladdy3y ago
Interaction handlers are their own piece that let you handle any interactions that aren't command ones
Want results from more Discord servers?
Add your server