22 async run(client, interaction, options) {
23 return interactionEmbed(4, "[INFO-DEV]", "", interaction, client, [false, 0]);
24 // ^ Temporary Fix ^ //
25 if(!interaction.replied) await interaction.deferReply(); // In case of overload26 const active = await process.Character.findOne({ where: { discordId: interaction.user.id, active: true } });27 if(!active) return interaction.editReply({ content: `${emojis.failure} | You don't have an active character!` });2829 if(options.getString("selective")) {30 return interaction.editReply({ content: `${emojis.failure} | You didn't select anything! Seems like your prey are safe... for now (Command is WIP)` });31 }3233 return interaction.editReply({ content: "*Nothing happened. This command is in development.*" });34 }
35};
Some code paths are unreachable because the return
, throw
, break
, and continue
statements unconditionally exit a block of code.
The code statements after the above keywords (which exit the code block) will not execute.
function func() {
return true;
next_func();
}
function add(a, b) {
throw new Error("Oops!");
return a + b;
}
while(value) {
break;
do_action();
}
throw new Error("Oops!");
console.log("done");
function check() {
if (Math.random() < 0.5) {
return;
} else {
throw new Error();
}
console.log("done");
}
for (;;) {}
console.log("done");
function func() {
return calc();
function calc() {
return 1;
}
}
switch (func) {
case 1:
var x = get_x();
use_x(x);
break;
}