Compare commits

..

No commits in common. "b91f8102a33b65b6b424bb592f13ba76f70094f5" and "025a664da5a4804af4d2401b91e96a0ef63ecee6" have entirely different histories.

2 changed files with 5 additions and 5 deletions

View File

@ -15,13 +15,13 @@ module.exports = () => async (ctx) => {
.map((i) => `_You roll a_ *D${diceSides}* _and get a_ *${i}*`) .map((i) => `_You roll a_ *D${diceSides}* _and get a_ *${i}*`)
.join("\n"); .join("\n");
let totalMessage = ""; let totalMessage = "";
if (numDice > 1 || ctx.match[4]) if (numDice > 1 || ctx.match[3])
totalMessage = `*Total:* ${total}`; totalMessage = `*Total:* ${total}`;
if (ctx.match[4]) { if (ctx.match[3]) {
const modifier = parseInt(ctx.match[6]); const modifier = parseInt(ctx.match[5]);
const sign = ctx.match[5]; const sign = ctx.match[4];
if (sign === "+") totalMessage += ` + ${modifier} = ${total + modifier}`; if (sign === "+") totalMessage += ` + ${modifier} = ${total + modifier}`;
else totalMessage += ` - ${modifier} = ${total - modifier}`; else totalMessage += ` - ${modifier} = ${total - modifier}`;

View File

@ -68,7 +68,7 @@ module.exports = (bot, [ questions, kys, insults, commands_list, words, roleplay
bot.command("donate", (ctx) => ctx.reply("Thanks for considering to donate." bot.command("donate", (ctx) => ctx.reply("Thanks for considering to donate."
+ " To support the development and hosting of Quadnite Bot, you can " + " To support the development and hosting of Quadnite Bot, you can "
+ "donate here: https://liberapay.com/ceda_ei/")); + "donate here: https://liberapay.com/ceda_ei/"));
bot.hears(/^\/?(\d*)d(\d+)(@\w+)?(\s*([-+])\s*(\d+))?$/i, dice()); bot.hears(/(\d*)d(\d+)(\s*([-+])\s*(\d+))?/i, dice());
function getGetGif(command) { function getGetGif(command) {