nyx/unused/commands/Utilities/add.js

69 lines
1.7 KiB
JavaScript
Raw Normal View History

module.exports = {
2022-01-31 20:13:11 +01:00
name: "economy",
category: "Owner",
2022-01-31 20:13:11 +01:00
description: "Add/Remove coins from someone",
Owner: true,
options: [
{
2022-10-26 12:38:28 +02:00
type: 1,
2022-01-31 20:13:11 +01:00
name: "add",
description: "Remove coins from someone",
options: [
{
type: 6,
name: "user",
description: "The user you want to add",
required: true,
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to add",
required: true,
},
],
},
{
2022-10-26 12:38:28 +02:00
type: 1,
2022-01-31 20:13:11 +01:00
name: "rmv",
description: "Remove coins from someone",
options: [
{
type: 6,
name: "user",
description: "The user you want to remove",
required: true,
},
{
type: 4,
name: "cp",
description: "The amount of CP you want to remove",
required: true,
},
],
},
],
run: async (client, interaction, args) => {
2022-01-31 20:13:11 +01:00
if (args[0] === "add") {
await client.add(args[0], args[1], interaction);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger(
"cp"
)}** ${client.currency} in **${
interaction.options.getUser("user").username
}**'s balance`,
});
}
if (args[0] === "rmv") {
await client.rmv(args[0], args[1]);
interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully removed **${interaction.options.getInteger(
"cp"
)}** ${client.currency} from **${
interaction.options.getUser("user").username
}**'s balance`,
});
}
},
};