This commit is contained in:
night0721 2022-02-01 03:13:11 +08:00
parent 9c2256a9da
commit 7d986ffdef
2 changed files with 56 additions and 50 deletions

View file

@ -1,9 +1,13 @@
module.exports = { module.exports = {
name: "add", name: "economy",
category: "Owner", category: "Owner",
usage: "(Number)", description: "Add/Remove coins from someone",
description: "Add coins from someone",
Owner: true, Owner: true,
options: [
{
type: 1,
name: "add",
description: "Remove coins from someone",
options: [ options: [
{ {
type: 6, type: 6,
@ -18,7 +22,29 @@ module.exports = {
required: true, required: true,
}, },
], ],
},
{
type: 1,
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) => { run: async (client, interaction, args) => {
if (args[0] === "add") {
await client.add(args[0], args[1], interaction); await client.add(args[0], args[1], interaction);
interaction.followUp({ interaction.followUp({
content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger( content: `<a:nyx_checkmark:897240322411724841> Successfully added **${interaction.options.getInteger(
@ -27,5 +53,16 @@ module.exports = {
interaction.options.getUser("user").username interaction.options.getUser("user").username
}**'s balance`, }**'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`,
});
}
}, },
}; };

View file

@ -1,31 +0,0 @@
module.exports = {
name: "rmv",
category: "Owner",
usage: "(Number)",
description: "Remove coins from someone",
Owner: true,
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) => {
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`,
});
},
};