MGalaCyber / Discord.js-v14-Command-Handler-Template

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
a year agoa year old
Expected to return a value at the end of async method 'execute'.
25     * @param {Client} client 
26     */
27
28    async execute(client, interaction) {29        try {
30            const selection = interaction.values[0];
31            const commands = readdirSync(`${process.cwd()}/Commands/Slash/${selection}`).filter(file => file.endsWith(".js")).join(" ").split(".js");
Expected to return a value at the end of async method 'execute'.
22     * @param {Client} client
23     */
24
25    async execute(client, interaction) {26        try {
27            const title = interaction.fields.getTextInputValue("modal-title");
28            const description = interaction.fields.getTextInputValue("modal-description");
Expected to return a value at the end of async method 'execute'.
23     * @param {Client} client
24     */
25
26    async execute(client, interaction) {27        try {
28            const testModal = new ModalBuilder()
29                .setCustomId("modal-test")