hippietrail
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
annoyingly today's café is less laggy/bursty so can't test it so far
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
i don't fully grok the ramifications. by returning
null
i change the inferred type into a nullable aka InteractionResponse<boolean> | null
and i don't need to care what an InteractionResponse or the boolean
in it mean?9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
i don't
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
just
let foo = await interaction.deferReply().catch(e => { return null; })
? seems that returns a InteractionResponse<boolean>
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
I've only used try/catch prior to this problem which I tracked down when I discovered .catch() which I don't yet have a feel for
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
i'm not quite expert level in js/ts yet. Not sure how to check for returning null from .catch
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 2/22/2024 in #djs-questions
How best to handle `unknown interaction` on `deferReply`
9 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 1/4/2024 in #djs-questions
How to add support for private slash commands
ah ok i just found that independently and it's working. this text made me wonder if it is a bit heavy handed
Guild-based deployment of commands is best suited for development and testing in your own personal server. Once you're satisfied that it's ready, deploy the command globally to publish it to all guilds that your bot is in.but i guess not as it's basically a private bot for my friends and one server so thanks everyone!
13 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 1/4/2024 in #djs-questions
How to add support for private slash commands
this is the video that was my starting point: https://www.youtube.com/watch?v=AvQcTjB3gPg
and its repo: https://github.com/CodingTrain/Discord-Bot-Examples/tree/main/01-discordjs
13 replies
DIAdiscord.js - Imagine an app
•Created by hippietrail on 1/4/2024 in #djs-questions
How to add support for private slash commands
i modified the
deploy-commands.js
from a Coding Train video to add support for multiple commands per module:
i only dug in and grokked enough to do my mods13 replies