I am trying to build a Discord Economy Bot and I am trying to dynamically give a user-specified amount of money to all members who have the mentioned role. When I run my code, no errors show. However, money isn't added to each member.
Example command: e!maasyatir @role xmoney
const Discord = require('discord.js');
const db = require('quick.db');
exports.run = async (bot, message, args, member) => {
if (!args[0]) return message.reply('Bir Sayı Girmen Gerek.');
if (!message.member.permissions.has('ADMINISTRATOR')) {
return message.reply('Bunu Yapmaya Yetkin Yok.');
}
let user = message.mentions.roles.first();
if (isNaN(args[1])) return;
db.add(`money_${message.guild.id}_${user}`, args[1]);
let moneyEmbed = new Discord.MessageEmbed()
.setColor('RANDOM')
.setDescription(
`✅ | ${user} Rolüne Sahip Kişilere ${args[1]} Değerinde Para Eklendi.`
);
message.channel.send(moneyEmbed);
};
module.exports.help = {
name: 'maasyatir',
aliases: ['maas'],
};