├── .gitignore ├── LICENSE ├── README.md ├── commands ├── nsfw │ ├── 4k.js │ ├── anal.js │ ├── ass.js │ ├── boobs.js │ ├── hanal.js │ ├── hass.js │ ├── hboobs.js │ ├── hentai.js │ ├── hkitsune.js │ ├── hmidriff.js │ ├── hneko.js │ ├── holo.js │ ├── kemonomimi.js │ ├── module.json │ ├── neko.js │ ├── pgif.js │ ├── pussy.js │ └── yaoi.js └── other │ ├── eval.js │ ├── exec.js │ ├── help.js │ ├── module.json │ └── stats.js ├── config.json ├── events ├── message.js └── ready.js ├── handler ├── Client.js ├── Event.js └── Module.js ├── index.js ├── package.json └── procfile /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Sayrix 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NSFW Bot 2 | 3 | NSFW Bot is an open-source discord bot that has nsfw commands running with the nekobot.xyz api. 4 | 5 | ## Commands : 6 | 7 | - NSFW Commands 🔞 : `4k`, `anal`, `ass`, `boobs`, `hanal`, `hass`, `hboobs`, `hentai`, `hkitsune`, `hmidriff`, `hneko`, `holo`, `kemonomimi`, `neko`, `pgif`, `pussy`, `yaoi` 8 | - Other Commands 🧷 : `help`, `stats` 9 | 10 | ## How to install ? 11 | 12 | ```bash 13 | git clone https://github.com/Sayrix/NSFW-Bot 14 | cd NSFW-Bot 15 | npm i 16 | ``` 17 | 18 | ## How to config ? 19 | 20 | ```json 21 | //config.json 22 | { 23 | "prefix": "your prefix", 24 | "token": "your token", 25 | "owners": ["OWNER ID"], 26 | "footer": "NSFW Bot • is.gd/nsfwbot", 27 | 28 | "msg": { 29 | "nsfwWarn": "You must use this command in an nsfw channel!", 30 | "loading": "Please wait...", 31 | "imageNotLoading": "Image not loading ? Click Here" 32 | } 33 | } 34 | ``` 35 | 36 | 37 | 38 | ## Many thanks to the people who will put a ⭐! 39 | -------------------------------------------------------------------------------- /commands/nsfw/4k.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/anal.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/ass.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/boobs.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hanal.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hass.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hboobs.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hentai.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hkitsune.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hmidriff.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/hneko.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/holo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/kemonomimi.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NSFW", 3 | "hide": false 4 | } 5 | -------------------------------------------------------------------------------- /commands/nsfw/neko.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/pgif.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/pussy.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/nsfw/yaoi.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | commandName = __filename.slice(__dirname.length + 1, -3), 3 | disbut = require("discord-buttons"); 4 | 5 | exports.run = async (client, message, args) => { 6 | if (!message.channel.nsfw) return message.channel.send(client.config.msg.nsfwWarn) 7 | 8 | let load = new Discord.MessageEmbed() 9 | .setDescription(client.config.msg.loading) 10 | .setTimestamp() 11 | 12 | message.channel.send(load).then(m => { 13 | 14 | client.superagent.get('https://nekobot.xyz/api/image').query({ 15 | type: commandName 16 | }).end((err, response) => { 17 | 18 | let button = new disbut.MessageButton() 19 | .setStyle('url') 20 | .setURL(response.body.message) 21 | .setLabel(client.config.msg.imageNotLoading); 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTimestamp() 25 | .setImage(response.body.message) 26 | .setFooter(client.config.footer) 27 | 28 | m.edit(embed, button); 29 | }); 30 | }); 31 | }; 32 | 33 | exports.help = { 34 | name: commandName, 35 | description: `Send a ${commandName} image.`, 36 | usage: commandName, 37 | example: commandName 38 | }; 39 | 40 | exports.conf = { 41 | aliases: [], 42 | cooldown: 5 // Integer = second. 43 | }; -------------------------------------------------------------------------------- /commands/other/eval.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | exports.run = async (client, message, args) => { 4 | if (!client.config.owners.includes(message.author.id)) return; 5 | 6 | try { 7 | let code = args.join(" "); 8 | let evaled = await eval(code); 9 | if (typeof evaled !== "string") { 10 | evaled = require("util").inspect(evaled); 11 | } 12 | message.channel.send(`\\✅ | L'eval s'est terminée sans problêmes :`).then(() => { 13 | message.channel.send(evaled, { 14 | code: "js", 15 | split: "\n" 16 | }); 17 | }) 18 | } catch (err) { 19 | message.channel.send(`\\❌ | Une erreur est survenue lors de l'exécution :\`\`\`js\n${err.stack}\n\`\`\``); 20 | } 21 | }; 22 | 23 | exports.help = { 24 | name: "eval", 25 | description: "Eval an command", 26 | usage: "eval ", 27 | example: "eval message.channel.send('a')" 28 | }; 29 | 30 | exports.conf = { 31 | aliases: [], 32 | cooldown: 5 // Integer = second. 33 | }; -------------------------------------------------------------------------------- /commands/other/exec.js: -------------------------------------------------------------------------------- 1 | const { 2 | exec 3 | } = require('child_process'); 4 | const Discord = require('discord.js'); 5 | 6 | exports.run = async (client, message, args) => { 7 | if (!client.config.owners.includes(message.author.id)) return message.channel.send(":x: Vous avez pas la permission de faire cette commande ! "); 8 | 9 | exec(`${args.join(' ')}`, (error, stdout) => { 10 | let response = (error || stdout); 11 | if (!error) message.channel.send(`\\✅ | L'execution s'est terminée sans problêmes :`); 12 | else message.channel.send(`\\❌ | Une erreur est survenue lors de l'exécution :`); 13 | message.channel.send(`${response}`, { 14 | code: "js", 15 | split: "\n" 16 | }).catch(e => console.log(e)); 17 | }); 18 | }; 19 | 20 | exports.help = { 21 | name: "exec", 22 | description: "Exec an command", 23 | usage: "exec ", 24 | example: "exec ls" 25 | }; 26 | 27 | exports.conf = { 28 | aliases: [], 29 | cooldown: 5 // Integer = second. 30 | }; -------------------------------------------------------------------------------- /commands/other/help.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | disbut = require("discord-buttons"); 3 | 4 | exports.run = async (client, message, args) => { 5 | var help = new Discord.MessageEmbed() 6 | .setAuthor('Help :') 7 | .setDescription(`Prefix : ${client.config.prefix}\nList of commands :`) 8 | .addField('NSFW :underage: :', '`4k`, `anal`, `ass`, `boobs`, `hanal`, `hass`, `hboobs`, `hentai`, `hkitsune`, `hmidriff`, `hneko`, `holo`, `kemonomimi`, `neko`, `pgif`, `pussy`, `yaoi`') 9 | .addField('Other :', '`help`, `stats`') 10 | .setTimestamp() 11 | 12 | message.channel.send(help) 13 | }; 14 | 15 | exports.help = { 16 | name: "help", 17 | description: "Give all commands of the bot.", 18 | usage: "help", 19 | example: "help" 20 | }; 21 | 22 | exports.conf = { 23 | aliases: [], 24 | cooldown: 5 // Integer = second. 25 | }; -------------------------------------------------------------------------------- /commands/other/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Other", 3 | "hide": false 4 | } 5 | -------------------------------------------------------------------------------- /commands/other/stats.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | os = require('os'); 3 | 4 | exports.run = async (client, message, args) => { 5 | let embed = new Discord.MessageEmbed() 6 | .setTimestamp() 7 | .addField(`:map: Number of servers`, `${client.guilds.cache.size}`, true) 8 | .addField(`:bust_in_silhouette: Number of users`, `${client.users.cache.size}`, true) 9 | .addField(`:speech_balloon: Number of channels`, `${client.channels.cache.size}`, true) 10 | .addField(`:desktop: Operating System`, `${os.platform()}`, true) 11 | .addField(`:gear: Architecture`, `${os.arch()}`, true) 12 | .addField(`:rocket: Processor`, `${os.cpus().map(i => `${i.model}`)[0]}`, true) 13 | .addField(`:pager: RAM`, `${Math.trunc((process.memoryUsage().heapUsed) / 1024 / 1000)} MB / ${Math.trunc(os.totalmem() / 1024 / 1000)} MB (${Math.round((Math.round(process.memoryUsage().heapUsed / 1024 / 1024) / Math.round(os.totalmem() / 1024 / 1024)) * 100)}%)`, true) 14 | .addField(`:dividers: Lib`, `Discord.js ${Discord.version}`, true) 15 | .addField(`:alarm_clock: Uptime`, "" + (Math.round(client.uptime / (1000 * 60 * 60))) + " Heure(s), " + (Math.round(client.uptime / (1000 * 60)) % 60) + " minute(s) et " + (Math.round(client.uptime / 1000) % 60) + " seconde(s)" + "") 16 | .setFooter(client.footer) 17 | 18 | message.channel.send(embed); 19 | }; 20 | 21 | exports.help = { 22 | name: "stats", 23 | description: "Give stats of the bot.", 24 | usage: "stats", 25 | example: "stats" 26 | }; 27 | 28 | exports.conf = { 29 | aliases: [], 30 | cooldown: 5 // Integer = second. 31 | }; -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "prefix": "your prefix", 3 | "token": "your token", 4 | "owners": ["OWNER ID"], 5 | "footer": "NSFW Bot • is.gd/nsfwbot", 6 | 7 | "msg": { 8 | "nsfwWarn": "You must use this command in an nsfw channel!", 9 | "loading": "Please wait...", 10 | "imageNotLoading": "Image not loading ? Click Here" 11 | } 12 | } -------------------------------------------------------------------------------- /events/message.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | cooldowns = new Discord.Collection(); 3 | 4 | module.exports = async (client, message) => { 5 | if (message.author.bot || message.author === client.user) return; 6 | if (message.channel.type === "dm") return; 7 | 8 | let prefix = client.config.prefix; // Your prefix on config.json 9 | if (!message.content.startsWith(prefix)) return; 10 | 11 | let args = message.content.slice(prefix.length).trim().split(/ +/g); 12 | let msg = message.content.toLowerCase(); 13 | let cmd = args.shift().toLowerCase(); 14 | let sender = message.author; 15 | message.flags = [] 16 | while (args[0] && args[0][0] === "-") { 17 | message.flags.push(args.shift().slice(1)); // Example: /play -soundcloud UP pice 18 | } 19 | 20 | let commandFile = client.commands.get(cmd) || client.commands.get(client.aliases.get(cmd)); 21 | if (!commandFile) return; // If the commands doesn't exist, ignore it. Don't send any warning on this. 22 | if (!cooldowns.has(commandFile.help.name)) cooldowns.set(commandFile.help.name, new Discord.Collection()); 23 | 24 | const member = message.member, 25 | now = Date.now(), 26 | timestamps = cooldowns.get(commandFile.help.name), 27 | cooldownAmount = (commandFile.conf.cooldown || 3) * 1000; 28 | 29 | if (!timestamps.has(member.id)) { 30 | if (!client.config.owners.includes(message.author.id)) { 31 | timestamps.set(member.id, now); 32 | } 33 | } else { 34 | const expirationTime = timestamps.get(member.id) + cooldownAmount; 35 | 36 | if (now < expirationTime) { 37 | const timeLeft = (expirationTime - now) / 1000; 38 | return message.channel.send(`Calm down dude, please wait **${timeLeft.toFixed(1)}** seconds to try the command again.`); 39 | } 40 | 41 | timestamps.set(member.id, now); 42 | setTimeout(() => timestamps.delete(member.id), cooldownAmount); // This will delete the cooldown from the user by itself. 43 | } 44 | 45 | try { 46 | if (!commandFile) return; 47 | commandFile.run(client, message, args); 48 | } catch (error) { 49 | console.log(error.message); 50 | } finally { 51 | console.log(`${sender.tag} (${sender.id}) ran a command: ${cmd}`); 52 | } 53 | } -------------------------------------------------------------------------------- /events/ready.js: -------------------------------------------------------------------------------- 1 | module.exports = client => { 2 | console.log("The bot is ready!"); 3 | } 4 | -------------------------------------------------------------------------------- /handler/Client.js: -------------------------------------------------------------------------------- 1 | const { 2 | Client, 3 | Collection 4 | } = require("discord.js"), 5 | superagent = require('superagent'); 6 | 7 | module.exports = class TutorialBot extends Client { 8 | constructor(options) { 9 | super(options) 10 | 11 | this.commands = new Collection(); // This will store your commands. 12 | this.cooldowns = new Collection(); // This will store your commands with cooldowns. 13 | this.aliases = new Collection(); // This will store your alternative commands. Example: /server -> /serverinfo, /guild, /guildinfo 14 | this.config = require('../config.json'); 15 | this.superagent = superagent 16 | this.package = require("../package.json"); 17 | this.recent = new Set(); 18 | } 19 | } -------------------------------------------------------------------------------- /handler/Event.js: -------------------------------------------------------------------------------- 1 | const { 2 | readdirSync 3 | } = require("fs"); 4 | 5 | module.exports = client => { 6 | const events = readdirSync("./events/"); 7 | for (let event of events) { 8 | let file = require(`../events/${event}`); 9 | client.on(event.split(".")[0], (...args) => file(client, ...args)); 10 | } 11 | } -------------------------------------------------------------------------------- /handler/Module.js: -------------------------------------------------------------------------------- 1 | const { 2 | Collection 3 | } = require("discord.js"), { 4 | readdir 5 | } = require("fs"), homePath = process.cwd(); 6 | 7 | module.exports = client => { 8 | client.commands = new Collection(); 9 | client.aliases = new Collection(); 10 | client.helps = new Collection(); 11 | 12 | readdir(`${homePath}/commands/`, (err, categories) => { 13 | if (err) console.log(err); 14 | console.log(`[available] ${categories.length} category`); 15 | categories.forEach(category => { 16 | let moduleConf = require(`${homePath}/commands/${category}/module.json`); 17 | if (moduleConf) { 18 | moduleConf.path = `${homePath}/commands/${category}`; 19 | moduleConf.cmds = []; 20 | client.helps.set(category, moduleConf); 21 | readdir(`${homePath}/commands/${category}`, (err, files) => { 22 | console.log(`[available] ${files.length - 1} cmds - ${category} category`); 23 | if (err) console.log(err); 24 | // let commands = new Array(); 25 | files.forEach(file => { 26 | if (file.endsWith(".js")) { 27 | let prop = require(`${homePath}/commands/${category}/${file}`); 28 | // let cmdName = file.split(".")[0]; 29 | client.commands.set(prop.help.name, prop); 30 | prop.conf.aliases.forEach(alias => client.aliases.set(alias, prop.help.name)); 31 | client.helps.get(category).cmds.push(prop.help.name); 32 | }; 33 | }); 34 | }); 35 | }; 36 | }); 37 | }); 38 | }; -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"), 2 | nsfwBot = require("./handler/Client.js"), 3 | client = new nsfwBot(), 4 | config = require('./config.json'); 5 | 6 | require("discord-buttons")(client); 7 | require("./handler/Module.js")(client); 8 | require("./handler/Event.js")(client); 9 | client.on("warn", console.warn); // This will warn you via logs if there was something wrong with your bot. 10 | client.on("error", console.error); // This will send you an error message via logs if there was something missing with your coding. 11 | client.login(config.token).catch(console.error); // This token will leads to the .env file. It's safe in there. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nsfw-bot", 3 | "version": "2.0.0", 4 | "description": "Bot pour se la durcir.", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js" 8 | }, 9 | "dependencies": { 10 | "discord-buttons": "^4.0.0", 11 | "discord.js": "^12.5.3", 12 | "os": "^0.1.2", 13 | "superagent": "^6.1.0" 14 | }, 15 | "engines": { 16 | "node": "14.x" 17 | }, 18 | "license": "MIT" 19 | } -------------------------------------------------------------------------------- /procfile: -------------------------------------------------------------------------------- 1 | working : node index.js 2 | --------------------------------------------------------------------------------