midorina
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
hmmm....
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
" + error + "
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
I can simply forward the message in the error promise, no?
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
I can put more details into the message yes. currently my main concern is what the best way to handle errors is. I don't want to copy and paste the method above for each method that can fail, or wrap the whole function with a try-catch block
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
then in this case idk how I exit the method above if an error has occurred unless I use a try-catch block :Thinkfusing:
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
What's the best practice to handle errors?
main method call:
the error handler method:
would this be considered the good practice?
10 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
I see. thanks
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
it does not have to be in the slash command data that we send to Discord. it's a check that the lib can do when the command is executed, no?
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
it's in
interaction.guild.members.me.permissions
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
what do you mean?
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
im curious why such a simple method does not exist on the builder
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
25 replies
DIAdiscord.js - Imagine an app
•Created by midorina on 3/24/2025 in #djs-questions
Any way to check if the bot has sufficient perms to execute a command with SlashCommandBuilder()?
but I can pass the flags, no?
25 replies