mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 01:20:48 +00:00
to js
This commit is contained in:
29
src/commands/settings/premium.js
Normal file
29
src/commands/settings/premium.js
Normal file
@ -0,0 +1,29 @@
|
||||
module.exports = {
|
||||
name: "premium",
|
||||
async execute(msg, args, client) {
|
||||
if (!args[2])
|
||||
return msg.channel.send(
|
||||
client.messages.premiumState +
|
||||
client.global.db.guilds[msg.guild.id].premium
|
||||
);
|
||||
if (msg.member.id !== client.config.devId)
|
||||
return msg.channel.send(client.messages.onlyDev);
|
||||
if (client.global.db.guilds[args[2]].premium === false) {
|
||||
client.global.db.guilds[args[2]].premium = true;
|
||||
let message;
|
||||
message = client.messages.nowPremium.replace(
|
||||
"%GUILD%",
|
||||
client.guilds.cache.get(args[2]).name
|
||||
);
|
||||
msg.channel.send(message);
|
||||
} else if (client.global.db.guilds[args[2]].premium === true) {
|
||||
client.global.db.guilds[args[2]].premium = false;
|
||||
let message;
|
||||
message = client.messages.noMorePremium.replace(
|
||||
"%GUILD%",
|
||||
client.guilds.cache.get(args[2]).name
|
||||
);
|
||||
msg.channel.send(message);
|
||||
}
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user