mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 15:58:06 +02:00
msg
This commit is contained in:
@@ -16,9 +16,9 @@ module.exports = class MagicBallCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { question } = args;
|
||||
const answer = answers[Math.floor(Math.random() * answers.length)];
|
||||
return message.say(`Question: ${question}\n:8ball: ${answer} :8ball:`);
|
||||
return msg.say(`Question: ${question}\n:8ball: ${answer} :8ball:`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,9 +16,9 @@ module.exports = class ChooseCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { choices } = args;
|
||||
const choice = choices[Math.floor(Math.random() * choices.length)];
|
||||
return message.say(`I choose ${choice}!`);
|
||||
return msg.say(`I choose ${choice}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,8 +15,8 @@ module.exports = class CoinFlipCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const side = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed on ${side}!`);
|
||||
return msg.say(`It landed on ${side}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,9 +16,9 @@ module.exports = class ComplimentCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { thing } = args;
|
||||
const compliment = compliments[Math.floor(Math.random() * compliments.length)];
|
||||
return message.say(`${thing}, ${compliment}`);
|
||||
return msg.say(`${thing}, ${compliment}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ module.exports = class FactCoreCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const fact = facts[Math.floor(Math.random() * facts.length)];
|
||||
return message.say(fact);
|
||||
return msg.say(fact);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ module.exports = class FishyCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const fish = fishes[Math.floor(Math.random() * fishes.length)];
|
||||
return message.say(`You caught a: ${fish}`);
|
||||
return msg.say(`You caught a: ${fish}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ module.exports = class FortuneCookieCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const fortune = fortunes[Math.floor(Math.random() * fortunes.length)];
|
||||
return message.say(fortune);
|
||||
return msg.say(fortune);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,15 +22,15 @@ module.exports = class RandomNameCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { gender } = args;
|
||||
const lastName = lastNames[Math.floor(Math.random() * lastNames.length)];
|
||||
if (gender === 'male') {
|
||||
const name = maleNames[Math.floor(Math.random() * maleNames.length)];
|
||||
return message.say(`${name} ${lastName}`);
|
||||
return msg.say(`${name} ${lastName}`);
|
||||
} else if (gender === 'female') {
|
||||
const name = femaleNames[Math.floor(Math.random() * femaleNames.length)];
|
||||
return message.say(`${name} ${lastName}`);
|
||||
return msg.say(`${name} ${lastName}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,8 +11,8 @@ module.exports = class OffspringCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const gender = genders[Math.floor(Math.random() * genders.length)];
|
||||
return message.say(`It's a ${gender}!`);
|
||||
return msg.say(`It's a ${gender}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,8 +14,8 @@ module.exports = class QuantumCoinCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
run(msg) {
|
||||
const side = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed ${side}.`);
|
||||
return msg.say(`It landed ${side}.`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,9 +18,9 @@ module.exports = class RateWaifuCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { waifu } = args;
|
||||
const rating = Math.floor(Math.random() * 10) + 1;
|
||||
return message.say(`I'd give ${waifu} a ${rating}/10!`);
|
||||
return msg.say(`I'd give ${waifu} a ${rating}/10!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,9 +16,9 @@ module.exports = class RoastCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { thing } = args;
|
||||
const roast = roasts[Math.floor(Math.random() * roasts.length)];
|
||||
return message.say(`${thing}, ${roast}`);
|
||||
return msg.say(`${thing}, ${roast}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,9 +18,9 @@ module.exports = class RollCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { value } = args;
|
||||
const roll = Math.floor(Math.random() * value) + 1;
|
||||
return message.say(`You rolled a ${roll}.`);
|
||||
return msg.say(`You rolled a ${roll}.`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class RouletteCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message) {
|
||||
return message.say(`I choose ${message.guild.members.random().displayName}!`);
|
||||
run(msg) {
|
||||
return msg.say(`I choose ${msg.guild.members.random().displayName}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,9 +18,9 @@ module.exports = class ShipCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
run(message, args) {
|
||||
run(msg, args) {
|
||||
const { things } = args;
|
||||
const rating = Math.floor(Math.random() * 100) + 1;
|
||||
return message.say(`I'd give ${things} a ${rating}%!`);
|
||||
return msg.say(`I'd give ${things} a ${rating}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user