13.0.2 revise ignore to dismiss invoice
This commit is contained in:
5 files changed
+12
-12
No files matched your search
+6
-6
@@ -353,9 +353,9 @@ module.exports = {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "can_ignore_invoices",
|
name: "can_dismiss_invoices",
|
||||||
description: "Allow users to ignore and delete invoices",
|
description: "Allow users to dismiss and delete invoices",
|
||||||
value: "can_ignore_invoices",
|
value: "can_dismiss_invoices",
|
||||||
type: 1,
|
type: 1,
|
||||||
options: [{
|
options: [{
|
||||||
name: "true_or_false",
|
name: "true_or_false",
|
||||||
@@ -868,8 +868,8 @@ module.exports = {
|
|||||||
|
|
||||||
return interaction.send({ embeds: [prompt], components: [opt], flags: (1 << 6) });
|
return interaction.send({ embeds: [prompt], components: [opt], flags: (1 << 6) });
|
||||||
|
|
||||||
} else if (args[0].name == 'can_ignore_invoices') {
|
} else if (args[0].name == 'can_dismiss_invoices') {
|
||||||
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$set: {"server.canIgnoreInvoices": args[0].options[0].value}}, function(err, res) {
|
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$set: {"server.canDismissInvoices": args[0].options[0].value}}, function(err, res) {
|
||||||
if (err) return client.sendInternalError(interaction, err);
|
if (err) return client.sendInternalError(interaction, err);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -920,7 +920,7 @@ module.exports = {
|
|||||||
{ name: 'Has Disptach Role?', value: `\`\`\`diff\n${dispatchRoleColor}${client.exists(GuildDB.dispatcherRole)}\`\`\`${dispatchRole}`, inline: true },
|
{ name: 'Has Disptach Role?', value: `\`\`\`diff\n${dispatchRoleColor}${client.exists(GuildDB.dispatcherRole)}\`\`\`${dispatchRole}`, inline: true },
|
||||||
{ name: 'Has Dispatch Channel?', value: `\`\`\`diff\n${dispatchChannelColor}${client.exists(GuildDB.dispatchChannel)}\`\`\`${dispatchChannel}`, inline: true },
|
{ name: 'Has Dispatch Channel?', value: `\`\`\`diff\n${dispatchChannelColor}${client.exists(GuildDB.dispatchChannel)}\`\`\`${dispatchChannel}`, inline: true },
|
||||||
{ name: 'Has bot admin role?', value: `\`\`\`diff\n${botAdminRoleColor}${client.exists(GuildDB.botAdmin)}\`\`\`${botAdminRole}`, inline: true },
|
{ name: 'Has bot admin role?', value: `\`\`\`diff\n${botAdminRoleColor}${client.exists(GuildDB.botAdmin)}\`\`\`${botAdminRole}`, inline: true },
|
||||||
{ name: 'Can Ignore Invoices?', value: `\`\`\`diff\n${GuildDB.canIgnoreInvoices ? '+ ' : '- '}${GuildDB.canIgnoreInvoices}\`\`\``, inline: true },
|
{ name: 'Can Dismiss Invoices?', value: `\`\`\`diff\n${GuildDB.canDismissInvoices ? '+ ' : '- '}${GuildDB.canDismissInvoices}\`\`\``, inline: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
return interaction.send({ embeds: [settingsEmbed] });
|
return interaction.send({ embeds: [settingsEmbed] });
|
||||||
|
|||||||
+2
-2
@@ -244,7 +244,7 @@ module.exports = {
|
|||||||
opt.addComponents(
|
opt.addComponents(
|
||||||
new ButtonBuilder()
|
new ButtonBuilder()
|
||||||
.setCustomId(`DeleteInvoice-${invoice.id}`)
|
.setCustomId(`DeleteInvoice-${invoice.id}`)
|
||||||
.setLabel("Ignore and Delete")
|
.setLabel("Dismiss & Delete")
|
||||||
.setStyle(ButtonStyle.Secondary)
|
.setStyle(ButtonStyle.Secondary)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ module.exports = {
|
|||||||
|
|
||||||
let successEmbed = new EmbedBuilder()
|
let successEmbed = new EmbedBuilder()
|
||||||
.setColor(client.config.Colors.Green)
|
.setColor(client.config.Colors.Green)
|
||||||
.setTitle(`Ignored and deleted invoice #${invoice.id}`);
|
.setTitle(`Dismissed and Deleted invoice #${invoice.id}`);
|
||||||
|
|
||||||
return interaction.update({ embeds: [successEmbed], components: [] });
|
return interaction.update({ embeds: [successEmbed], components: [] });
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ require('dotenv').config();
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
Dev: "PROD.",
|
Dev: "PROD.",
|
||||||
Version: "13.0.1", // (major).(feature).(revision/bug/refactoring)
|
Version: "13.0.2", // (major).(feature).(revision/bug/refactoring)
|
||||||
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
|
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
|
||||||
DefaultPrefix: "?",
|
DefaultPrefix: "?",
|
||||||
ServerID: "955668596745461830",
|
ServerID: "955668596745461830",
|
||||||
|
|||||||
@@ -101,9 +101,9 @@ module.exports = {
|
|||||||
`
|
`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "can_ignore_invoices",
|
name: "can_dismiss_invoices",
|
||||||
description: `
|
description: `
|
||||||
This configurations allows users who have been given an invoice to \`Ignore and Delete\` an invoice they choose rather than pay. This can be set to false, so users must pay their invoice.\n\n**Note:** Invoices are paid from a users bank balance, and not with their cash balance.
|
This configurations allows users who have been given an invoice to \`Dismiss & Delete\` an invoice they choose rather than pay. This can be set to false, so users must pay their invoice.\n\n**Note:** Invoices are paid from a users bank balance, and not with their cash balance.
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ class QuarksBot extends Client {
|
|||||||
onlyOfficersSearch: guild.server.onlyOfficersSearch,
|
onlyOfficersSearch: guild.server.onlyOfficersSearch,
|
||||||
botAdmin: guild.server.botAdmin,
|
botAdmin: guild.server.botAdmin,
|
||||||
casinoMultiplier: guild.server.casinoMultiplier,
|
casinoMultiplier: guild.server.casinoMultiplier,
|
||||||
canIgnoreInvoices: guild.server.canIgnoreInvoices,
|
canDismissInvoices: guild.server.canDismissInvoices,
|
||||||
}
|
}
|
||||||
return guildData;
|
return guildData;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user