merge from thunder

This commit is contained in:
night0721 2022-01-22 22:17:36 +08:00
parent d763390efd
commit 730b327934
8 changed files with 459 additions and 538 deletions

View file

@ -1,148 +0,0 @@
const fetch = require('node-fetch')
const { MessageActionRow, MessageButton, MessageEmbed, CommandInteraction } = require('discord.js');
module.exports = {
name : 'nsfw',
description: "nsfw command",
/**
* @param {Client} client
* @param {CommandInteraction} interaction
* @param {String[]} args
*/
run : async(client, interaction) => {
async function embed() {
if(!interaction.channel.nsfw){
const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`)
.setDescription('This command only works in NSFW Channels!')
.setImage('https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif')
.setColor("#02023a")
interaction.followUp({ embeds: [embed]})
return;
}
let subreddits = [
'GoneWild',
'WorkGoneWild',
'GoneWild30Plus',
'hentai',
'HentaiAnime',
'nekogirls',
'ass',
'BestBooties',
'BootyGIFs',
'booty_queens',
'BlowJob',
'blowjobs',
'blowjobgifs',
'OralSex',
'boobs',
'GrabHerTitties',
'titfuck',
'milf',
'OnlyHotMilfs',
'realmoms',
'thighs',
'PerfectThighs',
'thickthighs'
]
let reddit = subreddits[Math.round(Math.random() * (subreddits.length - 1))];
let embed1 = null
await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res => res.json().then(url => {
embed1 = new MessageEmbed()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle(`${url.title}`)
.setImage(`${url.url}`)
.setTimestamp()
.setColor("RED")
.setFooter(`${url.ups} 👍`)
}))
return embed1
}
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload')
.setStyle('SUCCESS'),
)
const disabled = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('reload')
.setLabel('Reload')
.setStyle('SECONDARY')
.setDisabled(true)
)
let m = await interaction.followUp({
embeds: [await embed()],
components: [row]
})
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
async function update(m) {
m.edit({
embeds: [await embed()]
}).catch(e => console.log(e.requestData.json.embeds))
const collector = m.createMessageComponentCollector({
componentType: 'BUTTON',
time: 120000,
});
collector.on('collect', async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate()
await update(m)
collector.stop()
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true
});
}
})
collector.on('end', (mes, r) => {
if (r == 'time') {
m.edit({
components: [disabled],
})
}
})
}
}
}

137
command/Owner/nsfw.js Normal file
View file

@ -0,0 +1,137 @@
const { getreddit } = require("cath");
const { MessageActionRow, MessageButton, MessageEmbed } = require("discord.js");
module.exports = {
name: "nsfw",
description: "nsfw command",
run: async (client, interaction) => {
const msg = await interaction.channel.send({ content: "Getting images" });
async function embed() {
if (!interaction.channel.nsfw) {
const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`)
.setDescription("This command only works in NSFW Channels!")
.setImage(
"https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif"
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setTimestamp();
interaction.followUp({ embeds: [embed] });
}
let subreddits = [
"GoneWild",
"WorkGoneWild",
"GoneWild30Plus",
"hentai",
"HentaiAnime",
"nekogirls",
"ass",
"BestBooties",
"BootyGIFs",
"booty_queens",
"BlowJob",
"blowjobs",
"blowjobgifs",
"OralSex",
"boobs",
"GrabHerTitties",
"titfuck",
"milf",
"OnlyHotMilfs",
"realmoms",
"thighs",
"PerfectThighs",
"thickthighs",
];
const reddit = subreddits[Math.round(Math.random() * subreddits.length)];
const data = await getreddit(reddit);
let embed1 = null;
embed1 = new MessageEmbed({
title: data.title,
url: data.url,
image: { url: data.image },
timestamp: Date.now(),
footer: { text: data.footer },
color: client.color,
author: {
name: interaction.user.tag,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
},
});
return embed1;
}
const row = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId("reload")
.setLabel("Reload")
.setStyle("SUCCESS")
);
const disabled = new MessageActionRow().addComponents(
new MessageButton()
.setCustomId("reload")
.setLabel("Reload")
.setStyle("SECONDARY")
.setDisabled(true)
);
await msg.delete();
let m = await interaction.followUp({
embeds: [await embed()],
components: [row],
});
const collector = m.createMessageComponentCollector({
componentType: "BUTTON",
time: 120000,
});
collector.on("collect", async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate();
await update(m);
collector.stop();
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true,
});
}
});
collector.on("end", (mes, r) => {
if (r == "time") {
m.edit({
components: [disabled],
});
}
});
async function update(m) {
m.edit({
embeds: [await embed()],
}).catch(null);
const collector = m.createMessageComponentCollector({
componentType: "BUTTON",
time: 120000,
});
collector.on("collect", async i => {
if (i.user.id === interaction.user.id) {
i.deferUpdate();
await update(m);
collector.stop();
} else {
i.reply({
content: `These buttons aren't for you!`,
ephemeral: true,
});
}
});
collector.on("end", (mes, r) => {
if (r == "time") {
m.edit({
components: [disabled],
});
}
});
}
},
};

173
nsfw.js
View file

@ -1,55 +1,63 @@
const fetch = require('node-fetch') const fetch = require("node-fetch");
const { MessageActionRow, MessageButton, MessageEmbed, CommandInteraction } = require('discord.js'); const {
MessageActionRow,
MessageButton,
MessageEmbed,
CommandInteraction,
} = require("discord.js");
module.exports = { module.exports = {
name : 'nsfw', name: "nsfw",
description: "nsfw command", description: "nsfw command",
/** /**
* @param {Client} client * @param {Client} client
* @param {CommandInteraction} interaction * @param {CommandInteraction} interaction
* @param {String[]} args * @param {String[]} args
*/ */
run : async(client, interaction) => { run: async (client, interaction) => {
async function embed() { async function embed() {
if(!interaction.channel.nsfw){ if (!interaction.channel.nsfw) {
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setTitle(`AYO Calm Yo Cheeks`) .setTitle(`AYO Calm Yo Cheeks`)
.setDescription('This command only works in NSFW Channels!') .setDescription("This command only works in NSFW Channels!")
.setImage('https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif') .setImage(
.setColor("#02023a") "https://media.discordapp.net/attachments/851761493815853060/893777701599584266/warning.gif"
)
.setColor("#02023a");
interaction.followUp({ embeds: [embed]}) interaction.followUp({ embeds: [embed] });
return; return;
} }
let subreddits = [ let subreddits = [
'GoneWild', "GoneWild",
'WorkGoneWild', "WorkGoneWild",
'GoneWild30Plus', "GoneWild30Plus",
'hentai', "hentai",
'HentaiAnime', "HentaiAnime",
'nekogirls', "nekogirls",
'ass', "ass",
'BestBooties', "BestBooties",
'BootyGIFs', "BootyGIFs",
'booty_queens', "booty_queens",
'BlowJob', "BlowJob",
'blowjobs', "blowjobs",
'blowjobgifs', "blowjobgifs",
'OralSex', "OralSex",
'boobs', "boobs",
'GrabHerTitties', "GrabHerTitties",
'titfuck', "titfuck",
'milf', "milf",
'OnlyHotMilfs', "OnlyHotMilfs",
'realmoms', "realmoms",
'thighs', "thighs",
'PerfectThighs', "PerfectThighs",
'thickthighs' "thickthighs",
] ];
let reddit = subreddits[Math.round(Math.random() * (subreddits.length - 1))]; let reddit =
subreddits[Math.round(Math.random() * (subreddits.length - 1))];
let embed1 = null let embed1 = null;
await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res => res.json().then(url => { await fetch(`https://meme-api.herokuapp.com/gimme/${reddit}`).then(res =>
res.json().then(url => {
embed1 = new MessageEmbed() embed1 = new MessageEmbed()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
@ -59,90 +67,83 @@ module.exports = {
.setImage(`${url.url}`) .setImage(`${url.url}`)
.setTimestamp() .setTimestamp()
.setColor("RED") .setColor("RED")
.setFooter(`${url.ups} 👍`) .setFooter(`${url.ups} 👍`);
})) })
return embed1 );
return embed1;
} }
const row = new MessageActionRow() const row = new MessageActionRow().addComponents(
.addComponents(
new MessageButton() new MessageButton()
.setCustomId('reload') .setCustomId("reload")
.setLabel('Reload') .setLabel("Reload")
.setStyle('SUCCESS'), .setStyle("SUCCESS")
) );
const disabled = new MessageActionRow() const disabled = new MessageActionRow().addComponents(
.addComponents(
new MessageButton() new MessageButton()
.setCustomId('reload') .setCustomId("reload")
.setLabel('Reload Meme') .setLabel("Reload Meme")
.setStyle('SECONDARY') .setStyle("SECONDARY")
.setDisabled(true) .setDisabled(true)
);
)
let m = await interaction.followUp({ let m = await interaction.followUp({
embeds: [await embed()], embeds: [await embed()],
components: [row] components: [row],
}) });
const collector = m.createMessageComponentCollector({ const collector = m.createMessageComponentCollector({
componentType: 'BUTTON', componentType: "BUTTON",
time: 120000, time: 120000,
}); });
collector.on('collect', async i => { collector.on("collect", async i => {
if (i.user.id === interaction.user.id) { if (i.user.id === interaction.user.id) {
i.deferUpdate() i.deferUpdate();
await update(m) await update(m);
collector.stop() collector.stop();
} else { } else {
i.reply({ i.reply({
content: `These buttons aren't for you!`, content: `These buttons aren't for you!`,
ephemeral: true ephemeral: true,
}); });
} }
}) });
collector.on('end', (mes, r) => { collector.on("end", (mes, r) => {
if (r == 'time') { if (r == "time") {
m.edit({ m.edit({
components: [disabled], components: [disabled],
}) });
} }
}) });
async function update(m) { async function update(m) {
m.edit({ m.edit({
embeds: [await embed()] embeds: [await embed()],
}).catch(e => console.log(e.requestData.json.embeds)) }).catch(e => console.log(e.requestData.json.embeds));
const collector = m.createMessageComponentCollector({ const collector = m.createMessageComponentCollector({
componentType: 'BUTTON', componentType: "BUTTON",
time: 120000, time: 120000,
}); });
collector.on('collect', async i => { collector.on("collect", async i => {
if (i.user.id === interaction.user.id) { if (i.user.id === interaction.user.id) {
i.deferUpdate();
i.deferUpdate() await update(m);
await update(m) collector.stop();
collector.stop()
} else { } else {
i.reply({ i.reply({
content: `These buttons aren't for you!`, content: `These buttons aren't for you!`,
ephemeral: true ephemeral: true,
}); });
} }
}) });
collector.on('end', (mes, r) => { collector.on("end", (mes, r) => {
if (r == 'time') { if (r == "time") {
m.edit({ m.edit({
components: [disabled], components: [disabled],
}) });
} }
}) });
} }
},
};
}
}

View file

@ -1,54 +0,0 @@
{
"name": "cath.exe",
"version": "0.0.1",
"description": "NYX bot created by Team NYX",
"engines": {
"node": "*",
"npm": "*"
},
"main": "index.js",
"scripts": {
"dev": "nodemon .",
"start": "node .",
"lint": "eslint .",
"node-update": "npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH",
"node-clean": "rm -rf node_modules && rm package-lock.json && npm cache clear --force && npm cache clean --force && npm i",
"all": "npm run node-update && npm run node-clean"
},
"repository": {
"type": "git",
"url": "git+https://github.com/night0721/cath.exe.git"
},
"keywords": [
"bot",
"nyx",
"codm",
"discord",
"gunsmith"
],
"author": "Ń1ght#0001",
"license": "CC-BY-NC-SA-4.0",
"bugs": {
"url": "https://github.com/night0721/cath.exe/issues"
},
"homepage": "https://github.com/night0721/cath.exe#readme",
"funding": {
"type": "individual",
"url": "https://ko-fi.com/cathteam"
},
"devDependencies": {
"node": "^17.3.0"
},
"dependencies": {
"axios": "^0.25.0",
"cath": "^1.4.6",
"discord.js": "^13.6.0",
"dotenv": "^14.2.0",
"erela.js": "^2.3.3",
"erela.js-spotify": "^1.2.0",
"goosecache": "^9.0.14",
"moment": "^2.29.1",
"mongoose": "^5.13.14",
"quickchart-js": "^2.0.3"
}
}

View file

@ -50,7 +50,7 @@ module.exports = {
NYX \`v${version}\` NYX \`v${version}\`
Discord.js \`v${djsversion}\` Discord.js \`v${djsversion}\`
Node.js \`${process.version}\``, Node.js \`${process.version}\``,
}, }
// Removed OS Info for troubleshooting. // Removed OS Info for troubleshooting.
// //
// { // {

View file

@ -1015,11 +1015,7 @@
"4x Tactical Scope", "4x Tactical Scope",
"4.4x Tactical Scope" "4.4x Tactical Scope"
], ],
"stock": [ "stock": ["YKM Light Stock", "OWC Skeleton Stock", "RTC Steady Stock"],
"YKM Light Stock",
"OWC Skeleton Stock",
"RTC Steady Stock"
],
"perk": [ "perk": [
"FMJ", "FMJ",
"Sleight of Hand", "Sleight of Hand",
@ -1039,11 +1035,7 @@
"Tactical Foregrip A", "Tactical Foregrip A",
"Bipod" "Bipod"
], ],
"ammo": [ "ammo": ["Extended Mag A", "Fast Reload", "Halberd Mag"],
"Extended Mag A",
"Fast Reload",
"Halberd Mag"
],
"rear_grip": [ "rear_grip": [
"Granulated Grip Tape", "Granulated Grip Tape",
"Ruberized Grip Tape", "Ruberized Grip Tape",
@ -2608,11 +2600,7 @@
"MIP Light FLash Guard", "MIP Light FLash Guard",
"RTC Light Muzzle Brake" "RTC Light Muzzle Brake"
], ],
"barrel": [ "barrel": ["Gurrilla Light Short", "Last Stand Light", "Banner Heavy"],
"Gurrilla Light Short",
"Last Stand Light",
"Banner Heavy"
],
"optic": [ "optic": [
"Red Dot Sight", "Red Dot Sight",
"Holographic Sight", "Holographic Sight",
@ -2638,10 +2626,7 @@
"Tactical Foregrip A", "Tactical Foregrip A",
"Operator Foregrip" "Operator Foregrip"
], ],
"ammo": [ "ammo": ["35 Round Fast Reload", "55 Round Light Reload"],
"35 Round Fast Reload",
"55 Round Light Reload"
],
"rear_grip": [ "rear_grip": [
"Sturdy Grip Tape", "Sturdy Grip Tape",
"Ruberized Grip Tape", "Ruberized Grip Tape",