string utils

master
Kit Kasune 3 years ago
parent 22db6a8658
commit ec1a866dd6
  1. 2
      bot.js
  2. 2
      commands/utility/randnum.js

@ -122,6 +122,8 @@ async function init() {
client.utils = {};
client.utils.logch = async () => {return client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915');};
client.utils.s = num => num === 1 ? '' : 's';
client.utils.as = (num, text) => `${text}${client.utils.s(num)}`;
client.guildconfig = {};
client.guildconfig.prefixes = new Map();

@ -41,7 +41,7 @@ module.exports = {
res += `${1 + 1}. \`${Math.floor(Math.random() * (nums[1] - nums[0] + 1) + nums[0])}\`\n`;
}
return message.channel.send({embeds: [new Discord.MessageEmbed()
.setTitle(`Random Number${num.length > 1 ? 's' : ''}`)
.setTitle(`Random Number${num.length === 1 ? '' : 's'}`)
.setDescription(res)
.setColor('c375f0')
.setFooter({text: "Natsuki", iconURL: client.user.avatarURL()})

Loading…
Cancel
Save