revamp bank commands
This commit is contained in:
6 files changed
+483
-507
No files matched your search
+11
-7
@@ -18,9 +18,9 @@ module.exports = {
|
||||
type: 1,
|
||||
options: [
|
||||
{
|
||||
name: "add/remove",
|
||||
name: "add_or_remove",
|
||||
description: "add/remove channel",
|
||||
value: "add/remove",
|
||||
value: "add_or_remove",
|
||||
type: 3,
|
||||
required: true,
|
||||
choices: [
|
||||
@@ -43,9 +43,9 @@ module.exports = {
|
||||
type: 1,
|
||||
options: [
|
||||
{
|
||||
name: "add/remove",
|
||||
name: "add_or_remove",
|
||||
description: "add/remove channel",
|
||||
value: "add/remove",
|
||||
value: "add_or_remove",
|
||||
type: 3,
|
||||
required: true,
|
||||
choices: [
|
||||
@@ -68,9 +68,9 @@ module.exports = {
|
||||
type: 1,
|
||||
options: [
|
||||
{
|
||||
name: "add/remove",
|
||||
name: "add_or_remove",
|
||||
description: "add/remove channel",
|
||||
value: "add/remove",
|
||||
value: "add_or_remove",
|
||||
type: 3,
|
||||
required: true,
|
||||
choices: [
|
||||
@@ -241,6 +241,7 @@ module.exports = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (args[0].name == 'action_channel') {
|
||||
const channelid = args[0].options[1].value;
|
||||
|
||||
@@ -313,6 +314,7 @@ module.exports = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (args[0].name == 'tweet_channel') {
|
||||
const channelid = args[0].options[1].value;
|
||||
|
||||
@@ -385,6 +387,7 @@ module.exports = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (args[0].name == 'starting_balance') {
|
||||
client.dbo.collection("guilds").updateOne({"server.serverID": GuildDB.serverID}, {"server.startingBalance":args[0].options[0].value}, function(err, res) {
|
||||
if (err) {
|
||||
@@ -430,7 +433,7 @@ module.exports = {
|
||||
});
|
||||
} else {
|
||||
client.dbo.collection("guilds").updateOne({"server.serverID":Guild.serverID, "server.incomeRoles.role": args[0].options[0].value},
|
||||
{$set: {"server.incomeRoles.$.income": args[1].value}}, function(err, res) {
|
||||
{$set: {"server.incomeRoles.$.income": args[0].options[1].value}}, function(err, res) {
|
||||
if (err) {
|
||||
client.log(err);
|
||||
const embed = new MessageEmbed()
|
||||
@@ -447,6 +450,7 @@ module.exports = {
|
||||
.setColor('GREEN');
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (args[0].name == 'remove_income_role') {
|
||||
const searchIndex = GuildDB.incomeRoles.findIndex((role) => role.role==args[0].options[0].value);
|
||||
if (searchIndex == -1) {
|
||||
|
||||
Reference in new issue
Block a user