JaBa/commands/Economy/setbio.js

30 lines
732 B
JavaScript
Raw Normal View History

2021-12-10 21:39:54 +05:00
const Command = require("../../base/Command.js");
class Setbio extends Command {
2021-12-26 19:29:37 +05:00
constructor(client) {
2021-12-10 21:39:54 +05:00
super(client, {
name: "setbio",
dirname: __dirname,
enabled: true,
guildOnly: false,
2021-12-26 19:29:37 +05:00
aliases: ["biography", "setdesc"],
2021-12-10 21:39:54 +05:00
memberPermissions: [],
2021-12-26 19:29:37 +05:00
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
2021-12-10 21:39:54 +05:00
nsfw: false,
ownerOnly: false,
cooldown: 3000
2021-12-10 21:39:54 +05:00
});
}
2021-12-26 19:29:37 +05:00
async run(message, args, data) {
2021-12-10 21:39:54 +05:00
const newBio = args.join(" ");
if (!newBio) return message.error("economy/setbio:MISSING");
if (newBio.length > 100) return message.error("economy/setbio:MAX_CHARACT");
data.userData.bio = newBio;
message.success("economy/setbio:SUCCESS");
await data.userData.save();
}
};
module.exports = Setbio;