From 910f5ef609c260b1426700fa7518bcd1a81b7644 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 19:32:40 -0400 Subject: [PATCH 01/11] Add collection for memberships --- functions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.js b/functions.js index fc3f73b..84e6333 100644 --- a/functions.js +++ b/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: { @@ -694,6 +700,7 @@ const functions = { console.error(err); }); }, + autoresponses: { // Specific responses for certain keywords in sent messages checkForAll(messageContent) { let responses = []; -- 2.45.2 From 8fb269e6c1872f7c3d98fe1b13ac2ea263d1da21 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 19:35:49 -0400 Subject: [PATCH 02/11] Versioning v3.5.0 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fec378..acce4ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index 1031769..9472a25 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodbot", - "version": "3.4.3", + "version": "3.5.0", "description": "Nods and Nod Accessories", "main": "main.js", "dependencies": { -- 2.45.2 From 1fd395385280fe544dcfed5e319e6900a9e12b6a Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 19:36:08 -0400 Subject: [PATCH 03/11] Add fn.checkMembership --- functions.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/functions.js b/functions.js index 84e6333..ea064dd 100644 --- a/functions.js +++ b/functions.js @@ -700,7 +700,14 @@ 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; + } + }, autoresponses: { // Specific responses for certain keywords in sent messages checkForAll(messageContent) { let responses = []; -- 2.45.2 From 5d05306b4d3c811a6cad34090801f16886411c54 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 19:40:52 -0400 Subject: [PATCH 04/11] Add fn.addMember and fn.removeMember --- functions.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/functions.js b/functions.js index ea064dd..7ab5d67 100644 --- a/functions.js +++ b/functions.js @@ -708,6 +708,20 @@ const functions = { 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 = []; -- 2.45.2 From 35517d791fb5b06d6752664c5c0d36f74b34a03c Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 20:19:19 -0400 Subject: [PATCH 05/11] Add /member Manager --- slash-commands/member.js | 62 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 slash-commands/member.js diff --git a/slash-commands/member.js b/slash-commands/member.js new file mode 100644 index 0000000..a7345cf --- /dev/null +++ b/slash-commands/member.js @@ -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}`); + } + } +}; \ No newline at end of file -- 2.45.2 From df9a3a0ebadef8676b445f1b76a52e5b6263437b Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 20:21:00 -0400 Subject: [PATCH 06/11] Add noMembership Embed Builder --- functions.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.js b/functions.js index 7ab5d67..9336ad4 100644 --- a/functions.js +++ b/functions.js @@ -435,6 +435,13 @@ 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" }); } }, collect: { -- 2.45.2 From 93251348a3e0e604fdab7d3a12ce9f072a0cb26d Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 20:21:37 -0400 Subject: [PATCH 07/11] Add membership checks for slash commands --- main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 42f29ce..d4d774d 100644 --- a/main.js +++ b/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); @@ -68,7 +69,11 @@ client.on('interactionCreate', async interaction => { } if (client.slashCommands.has(commandName)) { - client.slashCommands.get(commandName).execute(interaction); + if (fn.checkMembership(client, interaction.user.id)) { + client.slashCommands.get(commandName).execute(interaction); + } else { + interaction.reply(fn.embeds.noMembership()); + } } else { interaction.reply('Sorry, I don\'t have access to that command.'); console.error('Slash command attempted to run but not found: ' + commandName); -- 2.45.2 From 4cf3efa5846d6a9ee54be321f241d53e7a36a0ca Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 20:24:17 -0400 Subject: [PATCH 08/11] Add membership check to dot commands --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index d4d774d..f62edf8 100644 --- a/main.js +++ b/main.js @@ -143,7 +143,11 @@ client.on('messageCreate', message => { if (commandData.isValid && commandData.isCommand) { try { - client.dotCommands.get(commandData.command).execute(message, commandData); + if (fn.checkMembership(client, message.user.id)) { + client.dotCommands.get(commandData.command).execute(message, commandData); + } else { + message.reply(fn.embeds.noMembership()); + } } catch (error) { console.error(error); -- 2.45.2 From d15431b2990ebeeac8d4048b2b5b1d578b96803c Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 21:36:36 -0400 Subject: [PATCH 09/11] Add announcement --- functions.js | 16 +++++++++++++++- main.js | 6 +++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/functions.js b/functions.js index 9336ad4..23f1319 100644 --- a/functions.js +++ b/functions.js @@ -172,7 +172,7 @@ const functions = { memberships(client) { if (!client.memberships) client.memberships = new Discord.Collection(); client.memberships.clear(); - client.memberships.set(481933290912350209, "vfsh"); + client.memberships.set("481933290912350209", "vfsh"); if (isDev) console.log('Memberships Collection Built'); } }, @@ -442,6 +442,20 @@ const functions = { .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: { diff --git a/main.js b/main.js index f62edf8..22807b0 100644 --- a/main.js +++ b/main.js @@ -32,6 +32,7 @@ const ButtonHandlers = require('./CustomModules/ButtonHandlers.js'); const InteractionStorage = require('./CustomModules/InteractionStorage.js'); const isDev = process.env.isDev; let statusChannel; +const announcementChannelId = '1338314177579585617'; client.once('ready', async () => { fn.collections.interactionStorage(client); @@ -52,6 +53,9 @@ client.once('ready', async () => { // console.log(JSON.stringify(icaoArray)); statusChannel = await client.channels.fetch(statusChannelId).catch(e => console.error(e)); await statusChannel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`).catch(e => console.error(e)); + + const announcementChannel = await client.channels.fetch(announcementChannelId).catch(e => console.error(e)); + await announcementChannel.send(fn.embeds.membershipAnnouncement()).catch(e => console.error(e)); // Check for banned servers fn.checkBannedServers(client, statusChannel); }); @@ -143,7 +147,7 @@ client.on('messageCreate', message => { if (commandData.isValid && commandData.isCommand) { try { - if (fn.checkMembership(client, message.user.id)) { + if (fn.checkMembership(client, message.member.user.id)) { client.dotCommands.get(commandData.command).execute(message, commandData); } else { message.reply(fn.embeds.noMembership()); -- 2.45.2 From b10b126dc96cf43884a0a74ee6fc98944ca3fb36 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 31 Mar 2025 21:45:23 -0400 Subject: [PATCH 10/11] Update announcementChannelId to Prod --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 22807b0..46d646b 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,7 @@ const ButtonHandlers = require('./CustomModules/ButtonHandlers.js'); const InteractionStorage = require('./CustomModules/InteractionStorage.js'); const isDev = process.env.isDev; let statusChannel; -const announcementChannelId = '1338314177579585617'; +const announcementChannelId = '893183933645197312'; client.once('ready', async () => { fn.collections.interactionStorage(client); -- 2.45.2 From e88b33c4edbdbf071a85fd380d2172d5820a022e Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Wed, 2 Apr 2025 18:05:52 -0400 Subject: [PATCH 11/11] Rollback April Fools' --- main.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/main.js b/main.js index 46d646b..05e847c 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,6 @@ const ButtonHandlers = require('./CustomModules/ButtonHandlers.js'); const InteractionStorage = require('./CustomModules/InteractionStorage.js'); const isDev = process.env.isDev; let statusChannel; -const announcementChannelId = '893183933645197312'; client.once('ready', async () => { fn.collections.interactionStorage(client); @@ -53,9 +52,6 @@ client.once('ready', async () => { // console.log(JSON.stringify(icaoArray)); statusChannel = await client.channels.fetch(statusChannelId).catch(e => console.error(e)); await statusChannel.send(`${new Date().toISOString()} -- <@${process.env.ownerId}>\nStartup Sequence Complete`).catch(e => console.error(e)); - - const announcementChannel = await client.channels.fetch(announcementChannelId).catch(e => console.error(e)); - await announcementChannel.send(fn.embeds.membershipAnnouncement()).catch(e => console.error(e)); // Check for banned servers fn.checkBannedServers(client, statusChannel); }); @@ -73,11 +69,7 @@ client.on('interactionCreate', async interaction => { } if (client.slashCommands.has(commandName)) { - if (fn.checkMembership(client, interaction.user.id)) { - client.slashCommands.get(commandName).execute(interaction); - } else { - interaction.reply(fn.embeds.noMembership()); - } + client.slashCommands.get(commandName).execute(interaction); } else { interaction.reply('Sorry, I don\'t have access to that command.'); console.error('Slash command attempted to run but not found: ' + commandName); @@ -147,11 +139,7 @@ client.on('messageCreate', message => { if (commandData.isValid && commandData.isCommand) { try { - if (fn.checkMembership(client, message.member.user.id)) { - client.dotCommands.get(commandData.command).execute(message, commandData); - } else { - message.reply(fn.embeds.noMembership()); - } + client.dotCommands.get(commandData.command).execute(message, commandData); } catch (error) { console.error(error); -- 2.45.2