Merge pull request 'v3.5.0' (#30) from v3.5.0 into main
All checks were successful
NodBot PE Dockerization / build (push) Successful in 1m17s
All checks were successful
NodBot PE Dockerization / build (push) Successful in 1m17s
Reviewed-on: #30
This commit is contained in:
commit
5d5db3be40
@ -1,3 +1,7 @@
|
||||
## v3.5.x
|
||||
#### v3.5.0 (#30) The April Fools Update
|
||||
* Add April Fools stuff
|
||||
|
||||
## v3.4.x
|
||||
#### v3.4.3 (#29)
|
||||
* Fix `.gif` replies to redirect to the original replyee (#26)
|
||||
|
||||
49
functions.js
49
functions.js
@ -168,6 +168,12 @@ const functions = {
|
||||
if (!client.roaches) client.roaches = new Discord.Collection();
|
||||
client.roaches.clear();
|
||||
if (isDev) console.log('Medical Advice Collection Built');
|
||||
},
|
||||
memberships(client) {
|
||||
if (!client.memberships) client.memberships = new Discord.Collection();
|
||||
client.memberships.clear();
|
||||
client.memberships.set("481933290912350209", "vfsh");
|
||||
if (isDev) console.log('Memberships Collection Built');
|
||||
}
|
||||
},
|
||||
embeds: {
|
||||
@ -429,6 +435,27 @@ const functions = {
|
||||
const messagePayload = { embeds: [ messageEmbed ] };
|
||||
return messagePayload;
|
||||
}
|
||||
},
|
||||
noMembership() {
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: 'NodBot, powered by Enshittification'})
|
||||
.setTitle('🚨 Subscription Required 🚨')
|
||||
.setDescription('You have attempted to access NodBot\’s premium services without an active subscription. Please refer to our updated Terms of Service and pay the necessary fees to continue. [PayPal link](https://paypal.me/v0idf1sh)')
|
||||
.setFooter({ text: "Ligma balls" });
|
||||
return { embeds: [embed] };
|
||||
},
|
||||
membershipAnnouncement() {
|
||||
const announcement = '# 🚨 Attention, peasants 🚨\n\nBig changes are here! As of today, NodBot is no longer a free service. Due to rising operational costs, we’re moving to a subscription-based model.\n\nEffective immediately, non-paying users (freeloaders) will have all commands rejected. To regain access, kindly submit a donation of your hard-earned monies, I\'ll spend it better than you anyways.\n\n## 💰 New Pricing Structure\nNodBot\'s subscription is a pay-what-you-want model with a minimum monthly donation valued at $10 USD.\n\nThank you for your continued (and now mandatory) support!\n\n— NodBot, your favorite paywalled AI overlord';
|
||||
|
||||
const embed1 = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: 'Terms of Use' })
|
||||
.setDescription('By continuing to exist within the same digital space as NodBot, you automatically agree to the following terms:\n* Subscription Fees – Access to NodBot is now a privilege, not a right. Users must pay the required fees or suffer the consequences (i.e., total rejection and public shaming).\n* Payment Processing Period – Due to fraud prevention measures, payments must be verified before access to the bot is restored. Please allow 2-4 hours for access to be restored.\n* Non-Refundable Payments – If you thought there were refunds, think again moron. No take-backs.\n* Service Interruptions – NodBot may go offline at any time due to totally legitimate server issues. No compensation will be provided.\n* Arbitrary Rule Enforcement – Rules are subject to change at my whim, and compliance is mandatory.');
|
||||
|
||||
const embed2 = new Discord.MessageEmbed()
|
||||
.setAuthor({ name: 'Privacy Policy' })
|
||||
.setDescription('* Data Collection – NodBot does collect personal data, including but not limited to: location, IP address, MAC address, physical address, mother\'s maiden name, social security number, credit card numbers, phone fingerprints, physical fingerprints, penis length and girth, first pet\'s name, city where you met your spouse, and city where your parents met.\n* Payment Info – All payments are processed through a sketchy-looking PayPal link. NodBot and voidf1sh take no responsibility if your bank, CPA, lawyer, or local PD calls you afterward.\n* Chat Logs – NodBot may or may not remember every dumbass thing you’ve ever typed. Just assume it does.\n* Third-Party Sharing – Your usage data may be shared with savage\'s mom\n* Right to Be Forgotten – You can request NodBot forget your existence, but that requires a one-time processing fee of $50.');
|
||||
|
||||
return { content: announcement, embeds: [ embed1, embed2 ] };
|
||||
}
|
||||
},
|
||||
collect: {
|
||||
@ -694,6 +721,28 @@ const functions = {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
checkMembership(client, userId) {
|
||||
if (!client.memberships) throw new Error("Membership Collection Not Exist");
|
||||
if (client.memberships.has(userId)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
addMember(client, userId, username) {
|
||||
if (!client.memberships) throw new Error("Memberships Collection Not Exist");
|
||||
client.memberships.set(userId, username);
|
||||
return;
|
||||
},
|
||||
removeMember(client, userId) {
|
||||
if (!client.memberships) throw new Error("Memberships Collection Not Exist");
|
||||
if (client.memberships.has(userId)) {
|
||||
client.memberships.delete(userId);
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
},
|
||||
autoresponses: { // Specific responses for certain keywords in sent messages
|
||||
checkForAll(messageContent) {
|
||||
let responses = [];
|
||||
|
||||
1
main.js
1
main.js
@ -39,6 +39,7 @@ client.once('ready', async () => {
|
||||
fn.collections.dotCommands(client);
|
||||
fn.collections.setvalidCommands(client);
|
||||
fn.collections.roaches(client);
|
||||
fn.collections.memberships(client);
|
||||
await fn.download.gifs(client);
|
||||
await fn.download.pastas(client);
|
||||
await fn.download.joints(client);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodbot",
|
||||
"version": "3.4.3",
|
||||
"version": "3.5.0",
|
||||
"description": "Nods and Nod Accessories",
|
||||
"main": "main.js",
|
||||
"dependencies": {
|
||||
|
||||
62
slash-commands/member.js
Normal file
62
slash-commands/member.js
Normal file
@ -0,0 +1,62 @@
|
||||
const { SlashCommandBuilder } = require('@discordjs/builders');
|
||||
const fn = require('../functions.js');
|
||||
const strings = require('../strings.json');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('member')
|
||||
.setDescription('Manage NodBot paid memberships.')
|
||||
// Add
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('add')
|
||||
.setDescription('Add an authorized paying member.')
|
||||
.addUserOption(option =>
|
||||
option
|
||||
.setName('newmember')
|
||||
.setDescription('The member to add.')
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
// Remove
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand
|
||||
.setName('remove')
|
||||
.setDescription('Remove an authorized paying member.')
|
||||
.addUserOption(option =>
|
||||
option
|
||||
.setName('newmember')
|
||||
.setDescription('The member to remove.')
|
||||
.setRequired(true)
|
||||
)
|
||||
),
|
||||
async execute(interaction) {
|
||||
await interaction.deferReply();
|
||||
try {
|
||||
// Code Here...
|
||||
const subcommand = interaction.options.getSubcommand();
|
||||
const newmember = interaction.options.getUser('newmember');
|
||||
switch (subcommand) {
|
||||
// Add
|
||||
case "add":
|
||||
//TODO
|
||||
fn.addMember(interaction.client, newmember.id, newmember.username);
|
||||
interaction.editReply(`Member Added: ${newmember.username} [${newmember.id}]`);
|
||||
break;
|
||||
// Remove
|
||||
case "remove":
|
||||
fn.removeMember(interaction.client, newmember.id);
|
||||
interaction.editReply(`Member Removed: ${newmember.username} [${newmember.id}]`);
|
||||
break;
|
||||
// Default
|
||||
default:
|
||||
interaction.editReply(`No Changes: ${newmember.username} [${newmember.id}]`);
|
||||
break;
|
||||
}
|
||||
} catch (err) {
|
||||
const errorId = fn.generateErrorId();
|
||||
console.error(`${errorId}: err`);
|
||||
await interaction.editReply(`Sorry, an error has occured. Error ID: ${errorId}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user