├── logs ├── combined.log ├── error.log ├── spring.log.2021-03-31.0.gz ├── spring.log.2021-04-01.0.gz ├── spring.log.2021-04-02.0.gz ├── spring.log.2021-04-03.0.gz ├── spring.log.2021-04-04.0.gz ├── spring.log.2021-04-05.0.gz ├── spring.log.2021-04-06.0.gz ├── spring.log.2021-04-07.0.gz ├── spring.log.2021-04-08.0.gz ├── spring.log.2021-04-09.0.gz └── spring.log.2021-04-10.0.gz ├── internal └── modules │ └── cjs │ └── loader.js ├── Procfile ├── .slugignore ├── assets ├── heart.png ├── N6vhJmN.png ├── current.png ├── graphic.png ├── background.jpg ├── Roboto-Black.ttf ├── Poppins-Regular.ttf ├── bot_long_banner.png ├── NotoSansKR-Regular.otf └── Poppins-SemiBold.ttf ├── database.sqlite ├── images └── emoji.png ├── .gitignore ├── schemas ├── captcha.js ├── mute.js ├── chatbot-channel.js ├── starboard.js ├── FilterDB.js ├── ghostping.js ├── nsfw.js ├── antiraid.js ├── anti-invite.js ├── modlogs.js ├── todo.js ├── antiscam.js ├── autorole.js ├── birthday.js ├── blacklist-server.js ├── member-count.js ├── count.js ├── welcomeChannel.js ├── poll.js ├── muterole.js ├── ranks.js ├── boostsystem.js ├── jointocreatevc.js ├── queueSchema.js ├── reactionRoles.js ├── afk.js ├── warn.js ├── anti-alt.js ├── Guild.js ├── buttonrr.js ├── welcomeMessage.js ├── custom-welcome.js ├── antispam.js └── giveaway.js ├── commands ├── utility │ ├── uptime.js │ ├── count.js │ ├── flagguess.js │ ├── inviteme.js │ ├── check-birthday.js │ ├── ranks.js │ ├── dictionary.js │ ├── invite.js │ ├── allemoji.js │ ├── multiemoji.js │ ├── afk.js │ ├── translate.js │ ├── google.js │ ├── ytsearch.js │ ├── avatar.js │ ├── year.js │ ├── perms.js │ ├── twinfo.js │ ├── wikipedia.js │ ├── steal-emoji.js │ ├── twitter.js │ └── documention.js ├── owner │ ├── banemit.js │ ├── boostemit.js │ ├── simjoin.js │ ├── guildCreateEmit.js │ ├── botstatus.js │ ├── blacklist-remove.js │ ├── blacklist-add.js │ ├── pythoneval.js │ └── eval.js ├── images │ ├── triggered.js │ ├── wasted.js │ ├── change.js │ ├── spank.js │ ├── slap.js │ ├── delete.js │ ├── tweet.js │ ├── youtrash.js │ ├── oogway.js │ ├── simp.js │ ├── colorify.js │ ├── magikfy.js │ ├── googlemaps.js │ ├── whowin.js │ ├── color.js │ ├── amogus.js │ └── wallpaper.js ├── fun │ ├── logoguess.js │ ├── pokemonguess.js │ ├── pp.js │ ├── hug.js │ ├── reverse.js │ ├── bonk.js │ ├── 8ball.js │ ├── jokes.js │ ├── enlarge.js │ ├── kiss.js │ ├── roast.js │ ├── urban-dictionary.js │ ├── emoji.js │ └── howgay.js ├── administration │ ├── rank.js │ ├── unban.js │ ├── removerole.js │ ├── set-modlogs.js │ ├── set-chatbot.js │ ├── pull.js │ ├── setupcount.js │ ├── channelDelete.js │ ├── channelCreate.js │ ├── starboarddb.js │ ├── resetcount.js │ ├── serverprefix.js │ ├── addrole.js │ ├── invite-off.js │ ├── delRank.js │ ├── slowmode.js │ ├── removecount.js │ ├── channelLock.js │ ├── voicekick.js │ ├── kick.js │ ├── channelUnlock.js │ ├── setwelcome.js │ ├── checkChannel.js │ ├── listbans.js │ ├── clearwarns.js │ ├── addRank.js │ ├── lockdown.js │ ├── unmute.js │ ├── delwarn.js │ ├── vcunban.js │ ├── hackban.js │ ├── createMemberChannel.js │ ├── ban.js │ ├── nuke.js │ ├── warns.js │ └── anti-invite.js ├── levels │ └── leaderboard.js ├── gameinfo │ ├── champrotate.js │ ├── genshintalents.js │ ├── genshinchar.js │ └── genshinconst.js └── utils │ └── anime.js ├── webserver.js ├── example.env ├── slashcmd ├── music │ ├── clear.js │ ├── stop.js │ ├── resume.js │ ├── pause.js │ ├── shuffle.js │ ├── skip.js │ ├── removedupes.js │ ├── volume.js │ ├── removesong.js │ ├── jump.js │ ├── listqueue.js │ ├── loadqueue.js │ ├── loop.js │ └── playcontext.js ├── utility │ ├── count.js │ ├── snipes.js │ ├── translate.js │ ├── firstmessage.js │ ├── url.js │ ├── screenshot.js │ ├── giphy.js │ ├── inviteme.js │ ├── record.js │ ├── twitchinfo.js │ ├── pictotext.js │ ├── playrecord.js │ ├── avatar.js │ ├── google.js │ └── status.js ├── administration │ ├── nuke.js │ ├── listbans.js │ ├── unban.js │ ├── transferowner.js │ ├── hackban.js │ ├── removewarn.js │ ├── setmuterole.js │ ├── seticon.js │ ├── createrole.js │ ├── resetcount.js │ ├── kick.js │ ├── setcount.js │ ├── slowmode.js │ ├── removecount.js │ ├── advpurge.js │ └── unmute.js ├── fun │ ├── petpet.js │ ├── bonk.js │ └── bulbapedia.js └── serversetup │ ├── setupcount.js │ ├── removereaction.js │ ├── rolepanel.js │ ├── captcha.js │ └── chatbot.js └── classes └── emojis.json /logs/combined.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /logs/error.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /internal/modules/cjs/loader.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | worker: node index.js 2 | -------------------------------------------------------------------------------- /.slugignore: -------------------------------------------------------------------------------- 1 | /internal 2 | /logs 3 | /data -------------------------------------------------------------------------------- /assets/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/heart.png -------------------------------------------------------------------------------- /database.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/database.sqlite -------------------------------------------------------------------------------- /images/emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/images/emoji.png -------------------------------------------------------------------------------- /assets/N6vhJmN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/N6vhJmN.png -------------------------------------------------------------------------------- /assets/current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/current.png -------------------------------------------------------------------------------- /assets/graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/graphic.png -------------------------------------------------------------------------------- /assets/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/background.jpg -------------------------------------------------------------------------------- /assets/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/Roboto-Black.ttf -------------------------------------------------------------------------------- /assets/Poppins-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/Poppins-Regular.ttf -------------------------------------------------------------------------------- /assets/bot_long_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/bot_long_banner.png -------------------------------------------------------------------------------- /assets/NotoSansKR-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/NotoSansKR-Regular.otf -------------------------------------------------------------------------------- /assets/Poppins-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/assets/Poppins-SemiBold.ttf -------------------------------------------------------------------------------- /logs/spring.log.2021-03-31.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-03-31.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-01.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-01.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-02.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-02.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-03.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-03.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-04.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-04.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-05.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-05.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-06.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-06.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-07.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-07.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-08.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-08.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-09.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-09.0.gz -------------------------------------------------------------------------------- /logs/spring.log.2021-04-10.0.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Siris2314/NecroAtomicBot/HEAD/logs/spring.log.2021-04-10.0.gz -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /logs 3 | .env 4 | node_modules 5 | /images 6 | /internal 7 | internal 8 | /data 9 | data 10 | eng.traineddata 11 | .DS_Store 12 | -------------------------------------------------------------------------------- /schemas/captcha.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose') 2 | 3 | module.exports = model("captcha", new Schema({ 4 | Guild: String, 5 | Role: Object, 6 | })) -------------------------------------------------------------------------------- /schemas/mute.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose') 2 | 3 | module.exports = model("muted-members",new Schema({ 4 | Guild:String, 5 | Users:Array 6 | })) -------------------------------------------------------------------------------- /schemas/chatbot-channel.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose') 2 | 3 | module.exports = model("chatbot", new Schema({ 4 | Guild:String, 5 | Channel: String, 6 | }) 7 | ) -------------------------------------------------------------------------------- /schemas/starboard.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose') 2 | 3 | module.exports = model("Starboard", new Schema({ 4 | Guild:String, 5 | Channel: String, 6 | }) 7 | ) -------------------------------------------------------------------------------- /schemas/FilterDB.js: -------------------------------------------------------------------------------- 1 | const {model, Schema} = require('mongoose') 2 | 3 | module.exports = model("Filter", new Schema({ 4 | Guild:String, 5 | Log:String, 6 | Words:[String], 7 | })) -------------------------------------------------------------------------------- /schemas/ghostping.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | const Schema = new mongoose.Schema({ 4 | Guild:String 5 | }) 6 | 7 | module.exports = mongoose.model('ghostping', Schema) -------------------------------------------------------------------------------- /schemas/nsfw.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | 4 | module.exports = mongoose.model( 5 | "nsfw", 6 | new mongoose.Schema({ 7 | Server: String, 8 | }) 9 | ); -------------------------------------------------------------------------------- /schemas/antiraid.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | let Schema = new mongoose.Schema({ 4 | Guild: String, 5 | }) 6 | 7 | module.exports = mongoose.model('antiraid', Schema) 8 | -------------------------------------------------------------------------------- /schemas/anti-invite.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | 4 | module.exports = mongoose.model( 5 | "anti-invite", 6 | new mongoose.Schema({ 7 | Server: String 8 | }) 9 | ); -------------------------------------------------------------------------------- /schemas/modlogs.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose'); 2 | 3 | module.exports = model( 4 | "modlogs", 5 | new Schema({ 6 | Guild:String, 7 | Channel:String, 8 | }) 9 | ); -------------------------------------------------------------------------------- /schemas/todo.js: -------------------------------------------------------------------------------- 1 | const { Schema, model } = require("mongoose"); 2 | 3 | const todoSchema = new Schema({ 4 | userID: String, 5 | todos: Array 6 | }); 7 | 8 | module.exports = model("todo", todoSchema); -------------------------------------------------------------------------------- /schemas/antiscam.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | let Schema = new mongoose.Schema({ 4 | Guild: String, 5 | Punishment:String 6 | }) 7 | 8 | module.exports = mongoose.model('antiscam', Schema) -------------------------------------------------------------------------------- /schemas/autorole.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | const Schema = new mongoose.Schema({ 4 | Guild: String, 5 | Role: String, 6 | }) 7 | 8 | module.exports = mongoose.model('autorole', Schema) -------------------------------------------------------------------------------- /schemas/birthday.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | const Schema = new mongoose.Schema({ 4 | User:String, 5 | Birthday:String, 6 | }) 7 | 8 | module.exports = mongoose.model("birthday", Schema) -------------------------------------------------------------------------------- /schemas/blacklist-server.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | 4 | module.exports = mongoose.model( 5 | "blacklisted-servers", 6 | new mongoose.Schema({ 7 | Server: String 8 | }) 9 | ); -------------------------------------------------------------------------------- /schemas/member-count.js: -------------------------------------------------------------------------------- 1 | const {Schema, model } = require('mongoose'); 2 | 3 | module.exports = model('member-count', new Schema({ 4 | Guild:String, 5 | Channel:String, 6 | Member: String 7 | }) 8 | ); -------------------------------------------------------------------------------- /schemas/count.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose') 2 | 3 | module.exports = model("count", new Schema({ 4 | Guild:String, 5 | Channel: String, 6 | Count: Number, 7 | UserID: Number, 8 | }) 9 | ) -------------------------------------------------------------------------------- /schemas/welcomeChannel.js: -------------------------------------------------------------------------------- 1 | 2 | const mongo = require('mongoose') 3 | 4 | const Schema = new mongo.Schema({ 5 | Guild:String, 6 | Channel:String, 7 | }); 8 | 9 | module.exports = mongo.model('welcome-channel', Schema) -------------------------------------------------------------------------------- /schemas/poll.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | const poll = mongoose.Schema({ 4 | messageId: { type: String, required: true }, 5 | users: Array, 6 | }) 7 | 8 | module.exports = mongoose.model("poll", poll) -------------------------------------------------------------------------------- /schemas/muterole.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | let Schema = new mongoose.Schema({ 4 | Guild: String, 5 | Role: String 6 | }) 7 | 8 | module.exports = mongoose.model('Mute-Role', Schema, 'Mute-Role') 9 | -------------------------------------------------------------------------------- /schemas/ranks.js: -------------------------------------------------------------------------------- 1 | const {model, Schema} = require('mongoose') 2 | 3 | module.exports = model("ranks", 4 | new Schema({ 5 | Guild: String, 6 | Rank: String, 7 | Role: String 8 | }) 9 | 10 | ) -------------------------------------------------------------------------------- /schemas/boostsystem.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | 4 | module.exports = mongoose.model( 5 | "boostsystem", 6 | new mongoose.Schema({ 7 | Server: String, 8 | Channel:String 9 | }) 10 | ); -------------------------------------------------------------------------------- /schemas/jointocreatevc.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const schema = new mongoose.Schema({ 4 | guildId: String, 5 | channelId: String, 6 | 7 | }) 8 | 9 | module.exports = mongoose.model('jointocreatevc', schema); -------------------------------------------------------------------------------- /schemas/queueSchema.js: -------------------------------------------------------------------------------- 1 | const mongo = require('mongoose') 2 | 3 | const Schema = new mongo.Schema({ 4 | Guild:String, 5 | Name:String, 6 | Queue:Array, 7 | 8 | }) 9 | 10 | module.exports = mongo.model("queueSchema", Schema) -------------------------------------------------------------------------------- /schemas/reactionRoles.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const Schema = new mongoose.Schema({ 4 | guildId:String, 5 | roles:Array 6 | }) 7 | 8 | module.exports = new mongoose.model('reaction-roles', Schema); 9 | 10 | -------------------------------------------------------------------------------- /schemas/afk.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | let Schema = new mongoose.Schema({ 4 | Guild: String, 5 | Member: String, 6 | Content: String, 7 | TimeAgo: String 8 | }) 9 | 10 | module.exports = mongoose.model('afk', Schema) -------------------------------------------------------------------------------- /schemas/warn.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | module.exports = mongoose.model( 4 | 'warnings', 5 | new mongoose.Schema({ 6 | userId: String, 7 | guildId: String, 8 | moderatorId: String, 9 | reason: String, 10 | timestamp: Number, 11 | }) 12 | ); -------------------------------------------------------------------------------- /schemas/anti-alt.js: -------------------------------------------------------------------------------- 1 | const mongoose = require("mongoose") 2 | 3 | 4 | module.exports = mongoose.model( 5 | "anti-alt", 6 | new mongoose.Schema({ 7 | Guild: String, 8 | Option:String, 9 | Channel:String, 10 | Days: String 11 | 12 | }) 13 | ); -------------------------------------------------------------------------------- /schemas/Guild.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | const guildSchema = mongoose.Schema({ 4 | _id: mongoose.Schema.Types.ObjectId, 5 | guildID: String, 6 | guildName: String, 7 | prefix: String 8 | }); 9 | 10 | module.exports = mongoose.model('Guild', guildSchema, 'guild') 11 | -------------------------------------------------------------------------------- /schemas/buttonrr.js: -------------------------------------------------------------------------------- 1 | const {Schema, model} = require('mongoose'); 2 | 3 | const reactionRole = new Schema({ 4 | name:String, 5 | guild:String, 6 | message:String, 7 | roles:[{ 8 | role:String, 9 | emoji:String 10 | }] 11 | 12 | }) 13 | 14 | module.exports = model('reactionRole',reactionRole); -------------------------------------------------------------------------------- /schemas/welcomeMessage.js: -------------------------------------------------------------------------------- 1 | 2 | const mongo = require('mongoose') 3 | 4 | const Schema = new mongo.Schema({ 5 | Guild:String, 6 | Channel:String, 7 | RulesChannel:String, 8 | RolesChannel:String, 9 | ModeratorTag:String, 10 | AdminTag:String, 11 | Message:String, 12 | }); 13 | 14 | module.exports = mongo.model('welcome-message', Schema) -------------------------------------------------------------------------------- /schemas/custom-welcome.js: -------------------------------------------------------------------------------- 1 | 2 | const mongo = require('mongoose') 3 | 4 | const Schema = new mongo.Schema({ 5 | Guild:String, 6 | Channel:String, 7 | Background:String, 8 | Greeting:String, 9 | Message:String, 10 | GreetingColor:String, 11 | NameColor:String, 12 | AvatarColor:String, 13 | messageColor:String, 14 | font:String, 15 | 16 | }); 17 | 18 | module.exports = mongo.model('custom-welcome', Schema) -------------------------------------------------------------------------------- /commands/utility/uptime.js: -------------------------------------------------------------------------------- 1 | const pretty = require("pretty-ms"); 2 | 3 | 4 | module.exports = { 5 | name: 'uptime', 6 | description:'Returns Bot Uptime', 7 | usage:' uptime', 8 | 9 | 10 | async execute(message, args,client){ 11 | 12 | client.embed(message, { 13 | title:'Uptime of NecroAtomic Bot', 14 | description: `${pretty(client.uptime)}`, 15 | color:'RANDOM' 16 | 17 | }) 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /commands/owner/banemit.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const ownerid = process.env.ownerid; 3 | 4 | module.exports = { 5 | 6 | name:'banemit', 7 | description:'Simulates Ban Events(Owner Only)', 8 | 9 | async execute(message,args,client){ 10 | if(message.author.id != ownerid) return; 11 | 12 | 13 | 14 | 15 | client.emit('guildBanAdd', message.member); 16 | 17 | message.channel.send({content:'Ban Event Simulation Success'}) 18 | } 19 | } -------------------------------------------------------------------------------- /commands/owner/boostemit.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const ownerid = process.env.ownerid; 3 | 4 | module.exports = { 5 | 6 | name:'boostemit', 7 | description:'Simulates Boost Events(Owner Only)', 8 | 9 | async execute(message,args,client){ 10 | if(!message.author.id == ownerid) return; 11 | 12 | client.emit('guildMemberUpdate', message.member, message.member); 13 | 14 | message.channel.send({content:'Boost Update Simulation Success'}) 15 | } 16 | } -------------------------------------------------------------------------------- /commands/owner/simjoin.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const ownerid = process.env.ownerid; 3 | 4 | module.exports = { 5 | 6 | name:'simjoin', 7 | description:'Simulates a Member Joining Server(Owner Only)', 8 | 9 | async execute(message,args,client){ 10 | if(message.author.id != ownerid) return; 11 | 12 | 13 | 14 | 15 | client.emit('guildMemberAdd', message.member); 16 | 17 | message.channel.send({content:'Simulated Join Success'}) 18 | } 19 | } -------------------------------------------------------------------------------- /commands/owner/guildCreateEmit.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const ownerid = process.env.ownerid; 3 | 4 | module.exports = { 5 | 6 | name:'guildcreate', 7 | description:'Simulates Guild Create Events(Owner Only)', 8 | 9 | async execute(message,args,client){ 10 | if(!message.author.id == ownerid) return; 11 | 12 | 13 | 14 | 15 | client.emit('guildCreate', message.guild); 16 | 17 | message.channel.send({content:'Guild Create Event Simulation Success'}) 18 | } 19 | } -------------------------------------------------------------------------------- /webserver.js: -------------------------------------------------------------------------------- 1 | // webserver.js 2 | 3 | const express = require('express'); 4 | const app = express(); 5 | const port = process.env.PORT || 3000; // Use the PORT environment variable or default to 3000 6 | 7 | // Simple route to test the server 8 | app.get('/', (req, res) => { 9 | res.send('Hello World! Your Discord bot is running.'); 10 | }); 11 | 12 | // Start the web server 13 | app.listen(port, () => { 14 | console.log(`Web server is listening on port ${port}`); 15 | }); 16 | 17 | // Start your Discord bot 18 | require('./index.js'); 19 | -------------------------------------------------------------------------------- /commands/images/triggered.js: -------------------------------------------------------------------------------- 1 | const canva = require('canvacord') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | 6 | name: 'trigger', 7 | description: 'triggers a photo', 8 | 9 | async execute(message,args){ 10 | 11 | let avatar = message.author.displayAvatarURL({dynamic: false, format: "png"}); 12 | 13 | let image = await canva.Canvas.trigger(avatar); 14 | let triggered = new Discord.MessageAttachment(image, "triggered.gif") 15 | 16 | message.channel.send({files: [triggered]}); 17 | 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commands/images/wasted.js: -------------------------------------------------------------------------------- 1 | const canva = require("canvacord"); 2 | const Discord = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "wasted", 6 | description: "Make a picture wasted", 7 | 8 | async execute(message, args) { 9 | let avatar = message.author.displayAvatarURL({ dynamic: false, format: "png" }); 10 | 11 | let image = await canva.Canvas.wasted(avatar); 12 | let wasted = new Discord.MessageAttachment(image, "wasted.png"); 13 | 14 | message.channel.send({files: [wasted]}); 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /schemas/antispam.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | let Schema = new mongoose.Schema({ 4 | Guild: String, 5 | warnThreshold:Number, 6 | muteThreshold: Number, 7 | kickThreshold: Number, 8 | banThreshold: Number, 9 | timeInterval:Number, 10 | maxDuplicatesWarning: Number, 11 | maxDuplicatesKick:Number, 12 | maxDuplicatesBan:Number, 13 | maxDuplicatesMute:Number, 14 | ignoreBots:Boolean, 15 | unMuteTime:Number, 16 | removeMessage:Boolean, 17 | }) 18 | 19 | module.exports = mongoose.model('antispam', Schema) -------------------------------------------------------------------------------- /commands/utility/count.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/count') 2 | module.exports = { 3 | name:'count', 4 | description:'Check the next Count', 5 | 6 | async execute(message, args, client){ 7 | if(!message.member.permissions.has('SEND_MESSAGES')) return message.channel.send({content:'Invalid Perms'}) 8 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 9 | if(data) { 10 | return message.reply({content:`Next Count In <#${data.Channel}> is ${data.Count + 1}`}) 11 | } 12 | }) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /commands/fun/logoguess.js: -------------------------------------------------------------------------------- 1 | const { GTL } = require('djs-games') 2 | require('dotenv').config() 3 | const token = process.env.dagapi 4 | 5 | module.exports = { 6 | 7 | name:'logoguess', 8 | description:'Starts a logo guessing game', 9 | 10 | async execute(message,args,client){ 11 | const game = new GTL({ 12 | message: message, 13 | token: token, 14 | winMessage: 'You Win!', 15 | loseMessage: 'You Lose!', 16 | wrongGuess: 'Wrong Guess!', 17 | stopCommand: 'stop', 18 | maxAttempts: 10, 19 | }) 20 | game.start() 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /commands/images/change.js: -------------------------------------------------------------------------------- 1 | const canva = require('canvacord') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | 6 | name:"change", 7 | description:"change my mind meme", 8 | 9 | async execute(message, args, client){ 10 | 11 | let text = args.join(" "); 12 | 13 | if(!args[0]){ 14 | message.channel.send("Please send some text to meme") 15 | } 16 | 17 | let image = await canva.Canvas.changemymind(text); 18 | 19 | let attachment = new Discord.MessageAttachment(image, "cmm.png"); 20 | 21 | message.channel.send({files: [attachment]}); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /commands/utility/flagguess.js: -------------------------------------------------------------------------------- 1 | const { GTF } = require('djs-games') 2 | require('dotenv').config() 3 | const token = process.env.dagapi 4 | 5 | module.exports = { 6 | 7 | name:'flagguess', 8 | description:'Starts a flag guessing game', 9 | 10 | async execute(message,args,client){ 11 | const game = new GTF({ 12 | message: message, 13 | token: token, 14 | winMessage: 'You Win!', 15 | loseMessage: 'You Lose!', 16 | wrongGuess: 'Wrong Guess!', 17 | stopCommand: 'stop', 18 | maxAttempts: 10, 19 | }) 20 | game.start() 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /commands/fun/pokemonguess.js: -------------------------------------------------------------------------------- 1 | const { Pokemon } = require('djs-games') 2 | require('dotenv').config() 3 | const token = process.env.dagapi 4 | 5 | module.exports = { 6 | 7 | name:'pokemonguess', 8 | description:'Starts a pokemon guessing game', 9 | 10 | async execute(message,args,client){ 11 | const game = new Pokemon({ 12 | message: message, 13 | token: token, 14 | winMessage: 'You Win!', 15 | loseMessage: 'You Lose!', 16 | wrongGuess: 'Wrong Guess!', 17 | stopCommand: 'stop', 18 | maxAttempts: 10, 19 | }) 20 | game.start() 21 | } 22 | 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | botname = NecroAtomic Bot 2 | dagapi = //https://dagpi.xyz/dashboard to get API Key 3 | google = //Google Search API 4 | googleid = //Google Search API 5 | imdb = //IMDB API 6 | memeapi = //Memer API key 7 | mongoPath = //Mongo cluster key, make a cluster yourself 8 | news = https://newsapi.org api 9 | steam = //Steam Web API 10 | prefix = !necro 11 | giphy = //giphy api 12 | riot = //riot league api 13 | rpc = //personal rpc token 14 | token = //Discord Bot Token 15 | twitter = //Twitter API Dev Key 16 | serpapi = //Look up SerpAPI 17 | genius = //Genius API 18 | hf = //HuggingFace API Token 19 | weather = //OpenWeatherAPI Token, from https://openweathermap.org -------------------------------------------------------------------------------- /slashcmd/music/clear.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'clear', 5 | description:'Clears Queue', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | queue.clearQueue() 15 | 16 | interaction.followUp({content:`Queue Has Been Cleared`}) 17 | 18 | 19 | } 20 | } -------------------------------------------------------------------------------- /commands/images/spank.js: -------------------------------------------------------------------------------- 1 | const canva = require("canvacord"); 2 | const Discord = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "spank", 6 | description: "Make a picture spanked", 7 | 8 | async execute(message, args) { 9 | let avatar = message.author.displayAvatarURL({ dynamic: false, format: "png" }); 10 | let avatar1 = message.mentions.users.first() 11 | avatar1pic = avatar1.displayAvatarURL({ format: "png" }); 12 | let image = await canva.Canvas.spank(avatar, avatar1pic); 13 | let spank = new Discord.MessageAttachment(image, "spank.png"); 14 | 15 | message.channel.send({files: [spank]}); 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /commands/owner/botstatus.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const ownerID = process.env.ownerid; 3 | 4 | module.exports = { 5 | name:'botstatus', 6 | description:'Change Bot Status(Owner Only)', 7 | 8 | async execute(message, args,client){ 9 | 10 | if(!message.author.id == ownerID) return message.channel.send({content:":x: Owner Only Command"}); 11 | 12 | const text = args.join(" "); 13 | 14 | if(!text) return message.channel.send({content:'Please provide the status'}) 15 | 16 | client.user.setActivity(text); 17 | 18 | message.channel.send({content:`Bot Status has been set to ${text}`}); 19 | 20 | } 21 | 22 | 23 | 24 | } -------------------------------------------------------------------------------- /commands/images/slap.js: -------------------------------------------------------------------------------- 1 | const canva = require("canvacord"); 2 | const Discord = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "slap", 6 | description: "Make a picture slapped", 7 | 8 | async execute(message, args,client) { 9 | let avatar = message.author.displayAvatarURL({ dynamic: false, format: "png" }); 10 | let avatar1 = message.mentions.members.first() 11 | avatar1pic = avatar1.user.displayAvatarURL({ format: 'png' }) 12 | let image = await canva.Canvas.slap(avatar, avatar1pic); 13 | let slap = new Discord.MessageAttachment(image, "slap.png"); 14 | 15 | message.channel.send({files: [slap]}); 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /commands/utility/inviteme.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:'inviteme', 6 | description:'Creates an invite to invite NecroAtomicBot to other servers', 7 | 8 | async execute(message,args,client){ 9 | 10 | const embed = new Discord.MessageEmbed() 11 | .setTitle('Invite Me') 12 | .setDescription(`**[Click this to invite me](https://dsc.gg/necroatomic)**`) 13 | .setFooter(message.author.tag, message.author.displayAvatarURL({dynamic:true})) 14 | .setImage(client.user.displayAvatarURL({dynamic:true})) 15 | .setColor("#2F3136") 16 | 17 | 18 | return message.channel.send({embeds:[embed]}); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commands/images/delete.js: -------------------------------------------------------------------------------- 1 | const Meme = require("memer-api"); 2 | require("dotenv").config(); 3 | const key = process.env.memeapi 4 | const memer = new Meme(key); 5 | const Discord = require('discord.js') 6 | 7 | module.exports = { 8 | name:'delete', 9 | description:'Delete User Meme', 10 | 11 | async execute(message,args,client){ 12 | const avatar = message.mentions.users.first().displayAvatarURL({dynamic:false}) || message.author.displayAvatarURL({dynamic:false}) 13 | 14 | memer.delete(avatar).then(image => { 15 | const attachment = new Discord.MessageAttachment(image, "delete.png"); 16 | message.channel.send({files: [attachment]}); 17 | }) 18 | } 19 | } -------------------------------------------------------------------------------- /slashcmd/utility/count.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'count', 5 | description:'Check the next Count', 6 | permissions: ['SEND_MESSAGES'], 7 | 8 | /** 9 | * 10 | * @param {Client} client 11 | * @param {CommandInteraction} interaction 12 | */ 13 | run:async (client, interaction) =>{ 14 | 15 | Schema.findOne({Guild:interaction.guild.id}, async(err, data) => { 16 | if(data) { 17 | return interaction.reply({content:`Next Count In <#${data.Channel}> is ${data.Count + 1}`, ephemeral:true}) 18 | } 19 | }) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /slashcmd/administration/nuke.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "nuke", 5 | description: "Nukes a channel", 6 | permission: "ADMINISTRATOR", 7 | 8 | /** 9 | * 10 | * @param {Client} client 11 | * @param {CommandInteracion} interaction 12 | */ 13 | 14 | run: async (client, interaction) => { 15 | interaction.channel.clone().then((channel) => { 16 | channel.setPosition(interaction.channel.position); 17 | channel.send("Channel Has Been Nuked"); 18 | }); 19 | interaction.channel.delete().catch((e) => { 20 | return interaction.followUp({ content: "Something went wrong" }); 21 | }); 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /commands/fun/pp.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { MessageEmbed } = require("discord.js"); 3 | 4 | module.exports = { 5 | name:'pp', 6 | description:'PP Size(Dank Memer Style)', 7 | 8 | async execute(message, args,client){ 9 | let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.member; 10 | const size = (user.id.slice(-3) % 20) + 1; 11 | const sizee = size/2.54 12 | 13 | let embed = new MessageEmbed() 14 | .setColor("#242424") 15 | .setTitle(`PP size machine`) 16 | .setDescription(`${sizee.toFixed(2)} inch\n ${user.user.username}'s PP \n8${"=".repeat(size)}D`) 17 | 18 | await message.channel.send({embeds:[embed]}); 19 | } 20 | } -------------------------------------------------------------------------------- /commands/images/tweet.js: -------------------------------------------------------------------------------- 1 | const Meme = require("memer-api"); 2 | require("dotenv").config(); 3 | const key = process.env.memeapi 4 | const memer = new Meme(key); 5 | const Discord = require('discord.js') 6 | 7 | module.exports = { 8 | name:'twmeme', 9 | description:'Twitter Meme Command', 10 | 11 | async execute(message, args,client){ 12 | const avatar = message.author.displayAvatarURL({format: 'png'}) 13 | const text = args.join(" ") 14 | const username = message.author.username; 15 | memer.tweet(avatar, username,text).then(image => { 16 | const attachment = new Discord.MessageAttachment(image, "delete.png"); 17 | message.channel.send({files: [attachment]}); 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /slashcmd/music/stop.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'stop', 5 | description:'Stops and Clears Queue in a channel', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | interaction.guild.me.voice.disconnect() 15 | queue.stop() 16 | 17 | interaction.followUp({content:`Stopped Music and Disconnected from ${vc}`}) 18 | 19 | 20 | } 21 | } -------------------------------------------------------------------------------- /commands/images/youtrash.js: -------------------------------------------------------------------------------- 1 | const Meme = require("memer-api"); 2 | require("dotenv").config(); 3 | const key = process.env.memeapi 4 | const memer = new Meme(key); 5 | const Discord = require('discord.js') 6 | 7 | 8 | module.exports = { 9 | name:'youtrash', 10 | description: 'Youtube Meme Command', 11 | 12 | async execute(message,args,client){ 13 | const avatar = message.author.displayAvatarURL({format: 'png'}) 14 | const text = args.join(" ") 15 | const username = message.author.username; 16 | 17 | memer.youtube(avatar, username, text).then(image => { 18 | 19 | const attachment = new Discord.MessageAttachment(image, "youtube.png"); 20 | message.channel.send({files: [attachment]}); 21 | }) 22 | 23 | 24 | } 25 | } -------------------------------------------------------------------------------- /slashcmd/utility/snipes.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:'snipes', 6 | description:'Snipe Messages in a Channel', 7 | 8 | run: async(client, interaction) => { 9 | 10 | const msg = client.snipes.get(interaction.channel.id) 11 | 12 | 13 | if(!msg) return interaction.followUp({ content: 'There Are No Deleted Messages' }) 14 | 15 | const snipeEmbed = new MessageEmbed() 16 | .setAuthor(`${msg.author.tag}`, msg.author.displayAvatarURL()) 17 | .setColor(`#000488`) 18 | .setDescription(msg.content) 19 | .setTimestamp() 20 | 21 | 22 | if(msg.image)snipeEmbed.setImage(msg.image) 23 | interaction.followUp({ embeds: [snipeEmbed]}) 24 | }, 25 | 26 | 27 | } -------------------------------------------------------------------------------- /slashcmd/utility/translate.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction, ContextMenuInteraction} = require('discord.js') 2 | const translate = require('@iamtraction/google-translate'); 3 | 4 | module.exports = { 5 | 6 | name:"translate", 7 | type:"MESSAGE", 8 | 9 | /** 10 | * 11 | * 12 | * 13 | * 14 | * @param {Client} client 15 | * @param {ContextMenuInteraction} interaction 16 | * 17 | * 18 | */ 19 | 20 | 21 | 22 | run: async (client, interaction) => { 23 | const msg = await interaction.channel.messages.fetch(interaction.targetId); 24 | 25 | const translated = await translate(msg, {to: 'en'}) 26 | 27 | interaction.followUp({content:`${translated.text}`}) 28 | 29 | 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | } -------------------------------------------------------------------------------- /commands/utility/check-birthday.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/birthday') 3 | 4 | module.exports = { 5 | name:'check-birthday', 6 | description: 'Checks for user birthday', 7 | 8 | async execute(message,args, client){ 9 | const user = message.mentions.users.first() || message.author; 10 | Schema.findOne({User:user.id}, async(err, data)=>{ 11 | if(!data) return message.channel.send('User has not set a birthday') 12 | const embed = new MessageEmbed() 13 | .setTitle(`${message.author.username}'s birthday`) 14 | .setDescription(`${user} birthday is on ${data.Birthday}`) 15 | message.channel.send({embeds:[embed]}); 16 | }) 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /commands/administration/rank.js: -------------------------------------------------------------------------------- 1 | const RankSchema = require("../../schemas/ranks") 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'rank', 6 | description:'Singular Rank Display', 7 | 8 | async execute(message,args,client){ 9 | 10 | 11 | const rankName = args.join(" ") 12 | if(!rankName) return message.channel.send({content:'Please specify a rank'}) 13 | 14 | RankSchema.findOne({Guild: message.guild.id}, async(err, data) => { 15 | 16 | if(!data) return message.channel.send({content:'Rank does not exist'}) 17 | 18 | message.member.roles.add(data.Role) 19 | 20 | return message.channel.send({content:`You have received <@&${data.Role}`}) 21 | 22 | }) 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /commands/fun/hug.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { Random } = require("something-random-on-discord"); 3 | 4 | module.exports = { 5 | name: "hug", 6 | description: "Hug another user", 7 | async execute(message, args,client){ 8 | 9 | const target = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 10 | 11 | let data = await Random.getAnimeImgURL("hug"); 12 | 13 | if(!target){ 14 | return message.channel.send("Who Will U Hug? 💗") 15 | } 16 | 17 | let embed = new Discord.MessageEmbed() 18 | .setImage(data) 19 | .setColor("#2F3136") 20 | .setTitle(`${message.author.username} Hugs ${target.user.username} \ 💖`) 21 | .setTimestamp() 22 | 23 | return message.channel.send({embeds:[embed]}); 24 | } 25 | }; -------------------------------------------------------------------------------- /slashcmd/music/resume.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'resume', 5 | description:'Resumes Music In a Channel', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | if(queue.setPaused(false)){ 15 | return interaction.followUp({content:`Music in ${vc} is already resumed`}); 16 | } 17 | 18 | queue.setPaused(false) 19 | 20 | interaction.followUp({content:`Resumed Music in ${vc}`}) 21 | } 22 | } -------------------------------------------------------------------------------- /slashcmd/fun/petpet.js: -------------------------------------------------------------------------------- 1 | const {MessageEmbed, CommandInteraction, Client, MessageAttachment} = require('discord.js') 2 | const petPetGif = require('pet-pet-gif') 3 | 4 | module.exports = { 5 | name:'petpet', 6 | description:'Pet a picture', 7 | options:[ 8 | { 9 | name:'target', 10 | description:'Select whose profile pic you want to see', 11 | type:'USER', 12 | required:true 13 | } 14 | 15 | ], 16 | 17 | run: async (client, interaction) => { 18 | 19 | const Target = interaction.options.getUser('target') 20 | 21 | let animatedGif = await petPetGif(Target.displayAvatarURL({format:'png'})) 22 | 23 | const image = new MessageAttachment(animatedGif, 'petpet.gif') 24 | 25 | interaction.followUp({files:[image]}) 26 | 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /slashcmd/music/pause.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'pause', 5 | description:'Pauses Music In a Channel', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | if(queue.setPaused(true)){ 15 | return interaction.followUp({content:`Music in ${vc} is already paused`}); 16 | } 17 | 18 | queue.setPaused(true) 19 | 20 | interaction.followUp({content:`Paused Music in ${vc}`}) 21 | 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /commands/administration/unban.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'unban', 5 | description: 'unbans members', 6 | 7 | async execute(message, args,client){ 8 | 9 | if(!message.member.permissions.has('BAN_MEMBERS')) return message.channel.send({content:'Perms Denied'}) 10 | 11 | const id = args[0]; 12 | 13 | if(!id) return message.channel.send({content:'Please send an id'}) 14 | 15 | 16 | const bannedMembers = await message.guild.bans.fetch() 17 | 18 | if(!bannedMembers.find((user) => user.user.id === id)) return message.channel.send({content:'User is not banned from server'}) 19 | 20 | 21 | message.guild.members.unban(id); 22 | 23 | message.channel.send({content:`Unbanned user ${id}`}) 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /commands/administration/removerole.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | name: 'removerole', 5 | description: 'removes roles from users', 6 | 7 | async execute(message,args,client){ 8 | if(!message.member.permissions.has("MANAGE_ROLES")){ 9 | return message.channel.send({content:'Perms Denied'}) 10 | } 11 | 12 | const target = message.mentions.members.first() 13 | if(!target){ 14 | return message.channel.send({content:"Please sepcify user"}) 15 | } 16 | const role = message.mentions.roles.first() 17 | 18 | if(!role){ 19 | return message.channel.send({content:"Please specify role to give"}) 20 | } 21 | 22 | await target.roles.remove(role) 23 | 24 | message.channel.send({content:`${target.user.username} has had a role taken away`}) 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /commands/images/oogway.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const {MessageAttachment} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'oogway', 6 | description:'The AllMighty is Here', 7 | 8 | async execute(message,args,client){ 9 | 10 | const input = args.join(" ") 11 | 12 | if(!input) return message.reply({content:"Please provide text to display"}) 13 | 14 | 15 | await fetch(`https://luminabot.xyz/api/image/oogway?text=${(input)} `, { 16 | method: 'GET'}) 17 | .then(res => res.buffer()) 18 | .then((data) => { 19 | 20 | 21 | const attachment = new MessageAttachment(data, 'oogway.png'); 22 | 23 | message.channel.send({files:[attachment]}) 24 | }) 25 | 26 | 27 | 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /commands/fun/reverse.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | 3 | module.exports = { 4 | 5 | name:"reverse", 6 | description:"Reverses text", 7 | 8 | async execute(message,args,client) { 9 | 10 | let text = args.join(" ") 11 | if(!text) return message.channel.send('Please provide text to reverse') 12 | 13 | let newtext = text.split("").reverse().join("") 14 | const embed = new Discord.MessageEmbed() 15 | .setTitle("Word Reverse") 16 | .addFields( 17 | { name: `Original Text`, value: `\`\`\`${text}\`\`\``, inline:true}, 18 | { name: `Reversed Text`, value: `\`\`\`${newtext}\`\`\``, inline:false} 19 | ) 20 | .setColor("RANDOM") 21 | .setTimestamp() 22 | 23 | return message.channel.send({embeds:[embed]}); 24 | 25 | 26 | } 27 | 28 | 29 | 30 | } -------------------------------------------------------------------------------- /commands/utility/ranks.js: -------------------------------------------------------------------------------- 1 | const RankSchema = require("../../schemas/ranks") 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'ranks', 6 | description:'Displays The Rank System', 7 | 8 | async execute(message,args,client){ 9 | 10 | RankSchema.find({Guild: message.guild.id}, async(err, data) => { 11 | if(!data) return message.channel.send('No Data in database') 12 | 13 | const embedDescription = data.map(({Rank, Role}, index) => { 14 | return `#${index + 1 } | **${Rank}** -> <@&${Role}>` 15 | }).join('\n') 16 | 17 | message.channel.send({embeds:[ 18 | new MessageEmbed() 19 | .setDescription(embedDescription) 20 | .setColor('RANDOM') 21 | ]}) 22 | }) 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /slashcmd/fun/bonk.js: -------------------------------------------------------------------------------- 1 | const anime = require('anime-actions'); 2 | const {Client, CommandInteraction, MessageEmbed} = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "bonk", 6 | description: "Bonk another user", 7 | options:[ 8 | { 9 | name:'user', 10 | description:'User to bonk', 11 | type:'USER', 12 | required:true 13 | } 14 | ], 15 | 16 | 17 | run: async (client, interaction) => { 18 | 19 | const user = interaction.options.getUser('user') 20 | 21 | let data = await anime.bonk(); 22 | 23 | let embed = new MessageEmbed() 24 | .setImage(data) 25 | .setColor("#2F3136") 26 | .setTitle(`${interaction.user.username} bonks ${user.username}`) 27 | .setTimestamp() 28 | 29 | 30 | interaction.followUp({embeds:[embed]}); 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /commands/administration/set-modlogs.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | const Schema = require('../../schemas/modlogs'); 3 | module.exports = { 4 | name:'setlog', 5 | description: 'Sets a mod log channel', 6 | 7 | async execute(message,args,client){ 8 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Invalid Perms'}); 9 | const channel = message.mentions.channels.first() || message.channel; 10 | 11 | Schema.findOne({Guild: message.guild.id}, async (err,data) => { 12 | if(data) data.delete(); 13 | new Schema({ 14 | Guild:message.guild.id, 15 | Channel: channel.id, 16 | }).save(); 17 | message.channel.send({content:`Mod Log Channel has been set to ${channel}`}) 18 | }) 19 | 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /slashcmd/music/shuffle.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'shuffle', 5 | description:'Shuffles songs in the queue', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | if(queue.songs.length == 1) { 15 | return interaction.followUp({content:`Cannot Shuffle with only one song in queue`}); 16 | } 17 | else{ 18 | 19 | queue.shuffle() 20 | 21 | interaction.followUp({content:`Shuffled to ${queue.songs[1].name}`}) 22 | } 23 | 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /slashcmd/music/skip.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'skip', 5 | description:'Skip Music In a Channel', 6 | run: async (client, interaction) => { 7 | const vc = interaction.member.voice.channel 8 | 9 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 10 | 11 | let queue = client.player.getQueue(interaction.guild.id); 12 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 13 | 14 | if(queue.songs.length == 1) { 15 | return interaction.followUp({content:`Cannot Skip with only one song in queue`}); 16 | } 17 | 18 | else{ 19 | 20 | queue.skip() 21 | 22 | interaction.followUp({content:`Now Playing: ${queue.songs[1].name}`}) 23 | } 24 | 25 | 26 | 27 | } 28 | } -------------------------------------------------------------------------------- /commands/utility/dictionary.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | name:'dictionary', 6 | description:'Searches dictionary for terms', 7 | 8 | async execute(message,args,client){ 9 | 10 | const query = args.join(' ') 11 | 12 | if(!query) return message.channel.send('Please provide a query to search') 13 | 14 | axios.get(`https://some-random-api.ml/dictionary?word=${query}`) 15 | .then(response => { 16 | 17 | const def = response.data.definition 18 | 19 | 20 | const embed = new Discord.MessageEmbed() 21 | .setTitle(`${query}`) 22 | .setDescription(`${def}`) 23 | 24 | 25 | message.channel.send({embeds:[embed]}); 26 | 27 | 28 | 29 | 30 | 31 | }) 32 | 33 | 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /slashcmd/administration/listbans.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "listbans", 5 | description: "Returns List of Bans in a Server", 6 | permission: "BAN_MEMBERS", 7 | 8 | run: async (client, interaction) => { 9 | const fetchBans = interaction.guild.bans.fetch(); 10 | var amount = 1; 11 | const bannedMembers = (await fetchBans) 12 | .map( 13 | (member) => 14 | `${amount++} **${member.user.username}** | (*${member.user.id}*)` 15 | ) 16 | .join("\n"); 17 | 18 | const list = new MessageEmbed() 19 | .setTitle(`Bans in ${interaction.guild.name}`) 20 | .setDescription(`${bannedMembers}`) 21 | .setFooter({text:`Amount: ${amount - 1}`}) 22 | .setTimestamp() 23 | .setColor("RANDOM"); 24 | return interaction.followUp({ embeds: [list] }); 25 | }, 26 | }; 27 | -------------------------------------------------------------------------------- /slashcmd/utility/firstmessage.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js'); 2 | 3 | 4 | module.exports = { 5 | 6 | name:'firstmessage', 7 | description:'Fetches First Message in a Channel', 8 | 9 | run:async (client, interaction) => { 10 | 11 | const fetchmessages = await interaction.channel.messages.fetch({ limit: 1, after: 1 }) 12 | const msg = fetchmessages.first() 13 | 14 | const embed = new MessageEmbed() 15 | .setDescription(` 16 | **Message Content:** ${msg.content} 17 | **Sent By:** ${msg.author} 18 | **Date sent:** 19 | **URL:** [Click Me](${msg.url}) 20 | `) 21 | .setThumbnail(interaction.guild.iconURL({ dynamic: true })) 22 | .setColor(client.color.turquoise) 23 | .setTimestamp() 24 | interaction.followUp({ embeds: [embed] }) 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /commands/administration/set-chatbot.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/chatbot-channel') 3 | module.exports = { 4 | name:'set-chatbot', 5 | description:'Sets a chatbot in a channel', 6 | 7 | 8 | async execute(message, args,client){ 9 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Invalid Perms'}) 10 | 11 | const channel = message.mentions.channels.first() || message.channel 12 | 13 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 14 | if(data) data.delete(); 15 | 16 | new Schema({ 17 | Guild:message.guild.id, 18 | Channel: channel.id, 19 | }).save(); 20 | 21 | 22 | message.channel.send({content:`Saved chatbot channel to ${channel}`}) 23 | }) 24 | 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /commands/fun/bonk.js: -------------------------------------------------------------------------------- 1 | const anime = require('anime-actions'); 2 | const Discord = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "bonk", 6 | description: "Bonk another user", 7 | async execute(message, args, client) { 8 | 9 | try{ 10 | const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 11 | 12 | if(!user){ 13 | return message.channel.send("Who Will U Bonk??????????"); 14 | } 15 | 16 | let data = await anime.bonk(); 17 | 18 | let embed = new Discord.MessageEmbed() 19 | .setImage(data) 20 | .setColor("#2F3136") 21 | .setTitle(`${message.author.username} bonks ${user.user.username}`) 22 | .setTimestamp() 23 | 24 | 25 | return message.channel.send({embeds:[embed]}); 26 | 27 | } catch(err){ 28 | message.channel.send({content:'API ERROR'}) 29 | } 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /commands/administration/pull.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'pull', 5 | description: 'pulls members into VC', 6 | 7 | async execute(message,args, client){ 8 | if(!message.member.permissions.has('MANAGE_CHANNELS')) return message.channel.send({content:'Perms Denied'}) 9 | 10 | const member = message.mentions.members.first() 11 | 12 | if(!member) return message.channel.send({content:'Please mention a member to pull'}) 13 | 14 | if(!member.voice.channel) return message.channel.send({content:'This member is not in a VC'}) 15 | 16 | if(!message.member.voice.channel) return message.channel.send({content:'Must be in a VC to use this command'}) 17 | 18 | member.voice.setChannel(message.member.voice.channel) 19 | 20 | message.channel.send({content:`Moved member to ${message.member.voice.channel}`}) 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /commands/fun/8ball.js: -------------------------------------------------------------------------------- 1 | const neko = require('nekos.life'); 2 | const nekoclient = new neko(); 3 | const {MessageEmbed} = require('discord.js') 4 | 5 | module.exports = { 6 | name:"8ball", 7 | description:"Plays 8 Ball Game", 8 | 9 | async execute(message, args,client) { 10 | 11 | try{ 12 | const text = args.join(" "); 13 | if(!text) return message.channel.send({content:'Provide Text to play 8 Ball'}) 14 | await nekoclient.sfw['eightBall'](text).then(result => { 15 | const embed = new MessageEmbed() 16 | .setTitle(text) 17 | .setDescription(result.response) 18 | .setImage(result.url) 19 | 20 | message.channel.send({embeds:[embed]}) 21 | }) 22 | 23 | 24 | } catch(err){ 25 | message.channel.send({content:'API Error'}) 26 | console.log(err) 27 | } 28 | 29 | 30 | 31 | 32 | } 33 | 34 | 35 | } -------------------------------------------------------------------------------- /slashcmd/music/removedupes.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js'); 2 | 3 | module.exports = { 4 | name:'removedupes', 5 | description:'Removes Duplicate Songs From a Queue', 6 | run:async (client, interaction) => { 7 | 8 | const queue = client.player.getQueue(interaction.guild.id); 9 | if(!queue){ 10 | return interaction.followUp({content:'Music Bot is currently not playing'}) 11 | } 12 | if(queue.songs.length == 1){ 13 | return interaction.followUp({content:'Cannot remove dupes from a 1 song queue'}) 14 | } 15 | 16 | const uniquesongs = [] 17 | 18 | queue.songs.filter((song, i) => uniques.inludes(song.url) ? false : (uniques.push(song.url), true)) 19 | 20 | queue.songs = uniquesongs 21 | 22 | return interaction.followUp({content:'Removed Duplicates from your queue'}) 23 | 24 | 25 | 26 | 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /commands/administration/setupcount.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'setcount', 5 | description:'Sets a counting game to a channel', 6 | 7 | 8 | async execute(message, args, client){ 9 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Invalid Perms'}) 10 | 11 | const channel = message.mentions.channels.first() || message.channel 12 | 13 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 14 | if(data) data.delete(); 15 | 16 | new Schema({ 17 | Guild:message.guild.id, 18 | Channel:channel.id, 19 | Count:0 20 | }).save(); 21 | 22 | 23 | message.channel.send({content:`Saved counting game channel to ${channel}`}) 24 | }) 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commands/utility/invite.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | name: 'invite', 5 | description: 'gives you invite', 6 | 7 | async execute(message,args, client){ 8 | 9 | const embed = new Discord.MessageEmbed() 10 | if(args[0] == 'create'){ 11 | let channel = message.channel; 12 | channel.createInvite({unique: true}) 13 | .then(invite=> { 14 | embed 15 | .setTitle(message.author.username + "'s Invite") 16 | .setThumbnail(message.guild.iconURL({ dynamic: true })) 17 | .setDescription("https://discord.gg/" + invite.code) 18 | 19 | message.channel.send({embeds:[embed]}) 20 | }) 21 | } 22 | 23 | else { 24 | embed 25 | .setTitle("error") 26 | .setDescription("This command was not used correctly") 27 | message.channel.send({embeds:[embed]}) 28 | 29 | 30 | 31 | } 32 | 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /commands/administration/channelDelete.js: -------------------------------------------------------------------------------- 1 | const {Client, Message} = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:'channeldelete', 6 | description: 'Deletes a new channel', 7 | 8 | 9 | async execute(message, args,client){ 10 | 11 | if(!message.member.permissions.has('MANAGE_CHANNELS')){ 12 | return message.channel.send({content:'Perms Denied'}) 13 | } 14 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 15 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 16 | } 17 | 18 | const channelTarget = message.mentions.channels.first() 19 | 20 | if(!channelTarget){ 21 | return message.channel.send({content:'Please specify a channel name'}) 22 | } 23 | 24 | channelTarget.delete().then((ch) => { 25 | message.author.send({content:`Channel has been deleted`}) 26 | }); 27 | 28 | 29 | 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /commands/images/simp.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const Canvas = require('canvas'); 3 | module.exports = { 4 | name : 'simp', 5 | description:'Returns Simp Avatar Picture', 6 | async execute(message, args,client){ 7 | const member = message.mentions.members.first() || message.member; 8 | const avatar = await Canvas.loadImage(member.user.displayAvatarURL({ format: 'jpg' })); 9 | let bg = await Canvas.loadImage('https://media.discordapp.net/attachments/839828075624923199/855655030191292416/2bb57a4642b8381d8ec313e31a464bdb.png?width=670&height=670'); 10 | 11 | const canvas = Canvas.createCanvas(1000, 1000); 12 | const ctx = canvas.getContext(`2d`); 13 | 14 | ctx.drawImage(avatar, 0, 0, 1000, 1000); 15 | ctx.drawImage(bg, 0, 0, 1000, 1000); 16 | 17 | const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'ARCHIE.jpg'); 18 | message.channel.send({files: [attachment]}); 19 | } 20 | } -------------------------------------------------------------------------------- /commands/administration/channelCreate.js: -------------------------------------------------------------------------------- 1 | const {Client, Message} = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:"channelcreate", 6 | description: 'creates a new channel', 7 | 8 | 9 | async execute(message, args,client){ 10 | 11 | if(!message.member.permissions.has('MANAGE_CHANNELS')){ 12 | return message.channel.send({content:'Perms Denied'}) 13 | } 14 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 15 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 16 | } 17 | 18 | const channelNameQuery = args.join(" "); 19 | 20 | if(!channelNameQuery){ 21 | return message.channel.send({content:'Please specify a channel name'}) 22 | } 23 | 24 | message.guild.channels.create(channelNameQuery).then((ch) => { 25 | message.channel.send({content:`Click ${ch} to access the newly created channel`}) 26 | }); 27 | }, 28 | 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /commands/administration/starboarddb.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/starboard') 3 | 4 | module.exports = { 5 | name:'set-starboard', 6 | description: 'Sets a starboard channel', 7 | 8 | async execute(message,args,client){ 9 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Perms Denied'}) 10 | 11 | const channel = message.mentions.channels.first(); 12 | 13 | if(!channel) return message.channel.send({content:"Please mention a channel"}); 14 | 15 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 16 | if(data) data.delete(); 17 | 18 | new Schema({ 19 | Guild:message.guild.id, 20 | Channel: channel.id, 21 | }).save(); 22 | 23 | 24 | message.channel.send({content:`Saved starboard channel to ${channel}`}) 25 | }) 26 | 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /slashcmd/music/volume.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'volume', 5 | description:'Changes Volume For Music', 6 | options: [ 7 | { 8 | name:'volume', 9 | description:'Volume to Increase/Decrease By', 10 | required:true, 11 | type:'NUMBER', 12 | } 13 | 14 | ], 15 | run: async (client, interaction) => { 16 | const vc = interaction.member.voice.channel 17 | 18 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 19 | 20 | let queue = client.player.getQueue(interaction.guild.id); 21 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 22 | 23 | const volume = interaction.options.getNumber('volume') 24 | 25 | queue.setVolume(volume) 26 | 27 | 28 | interaction.followUp({content:`Volume has been changed to **${volume}**`}) 29 | 30 | 31 | } 32 | } -------------------------------------------------------------------------------- /commands/images/colorify.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = { 3 | name: "colorify", 4 | async execute(message, args,client) { 5 | let pinged = message.mentions.users.first(); 6 | let color = args[1]; 7 | if(!pinged) { 8 | pinged = message.author; 9 | color = args[0] 10 | } 11 | if(!color) return message.reply("Please provide the name of the color with which you want to colorify the avatar! Example: `>colorify @user color` or `>colorify color`") 12 | let av = pinged.displayAvatarURL({ dynamic: false, format: "png" }) 13 | let image = `https://api.popcatdev.repl.co/colorify?image=${av}&color=${color}` 14 | console.log(image) 15 | let em = new Discord.MessageEmbed() 16 | .setTitle("Colored Picture Of " + pinged.username) 17 | .setImage(image) 18 | .setColor(color.toUpperCase()) 19 | .setFooter("If the color shown is just grey, it is not supported.") 20 | 21 | return message.channel.send({embeds:[em]}); 22 | } 23 | } -------------------------------------------------------------------------------- /commands/fun/jokes.js: -------------------------------------------------------------------------------- 1 | 2 | const fetch = require('node-fetch'); 3 | 4 | module.exports = { 5 | name: "jokes", 6 | description: "Get jokes", 7 | async execute(message,args,client) { 8 | try{ 9 | fetch("https://official-joke-api.appspot.com/random_joke") 10 | .then(function (response) { 11 | return response.json(); 12 | }) 13 | .then(function (data) { 14 | const jokes = { 15 | title: "Jokes", 16 | color: 3973927, 17 | fields: [ 18 | { 19 | name: `:rofl: ${data["setup"]} :rofl:`, 20 | value: data["punchline"], 21 | }, 22 | ], 23 | timestamp: new Date(), 24 | }; 25 | msg.channel.send({ embeds: [jokes] }); 26 | }); 27 | } catch(err){ 28 | message.channel.send("API Error") 29 | } 30 | }, 31 | } -------------------------------------------------------------------------------- /commands/images/magikfy.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const Discord = require('discord.js') 3 | 4 | 5 | module.exports = { 6 | name:'magikfy', 7 | description:'Magikfy user', 8 | 9 | async execute(message, args,client){ 10 | let image = message.mentions.users.first()?.displayAvatarURL({dynamic:false, format: "png"}) || message.author.displayAvatarURL({dynamic:false, format: "png"}) 11 | 12 | let intensity = Number(args[0]); 13 | 14 | if(isNaN(intensity)) return message.channel.send('Please enter an intensity of the image, ranging from 1-10'); 15 | await fetch(`https://nekobot.xyz/api/imagegen?type=magik&image=${image}&intensity=${intensity}`) 16 | .then(response => response.json()) 17 | .then(json => { 18 | 19 | const attachment = new Discord.MessageAttachment(json.message, 'magik.png') 20 | 21 | message.channel.send({files: [attachment]}); 22 | 23 | 24 | }) 25 | 26 | 27 | 28 | } 29 | 30 | 31 | 32 | } -------------------------------------------------------------------------------- /commands/administration/resetcount.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/count') 2 | module.exports = { 3 | name:'resetcount', 4 | description:'Resets the counting.', 5 | async execute(message, args, client){ 6 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Invalid Perms'}) 7 | 8 | const channel = message.mentions.channels.first() || message.channel 9 | 10 | 11 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 12 | if( channel != data.Channel) { 13 | message.channel.send({content: `There\'s no Counting System Set in <#${channel.id}>`}) 14 | } 15 | if(!data) return message.channel.send({content: "Set a Counting Channel First"}) 16 | if(data) { data.Count = 0; //Reset Game to 0 17 | data.UserID = null; //Reset User ID in Database 18 | await data.save(); 19 | message.channel.send({content: `Counting System Resetted.`}) 20 | } 21 | }); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /commands/administration/serverprefix.js: -------------------------------------------------------------------------------- 1 | const guildSchema = require('../../schemas/Guild') 2 | 3 | module.exports = { 4 | name:'serverprefix', 5 | description:'Returns the server prefix', 6 | 7 | async execute(message,args,client){ 8 | 9 | await guildSchema.findOne({guildID:message.guild.id}, async(err, data)=>{ 10 | 11 | 12 | client.embed(message,{ 13 | title:`Server Prefix for **${message.guild.name}**`, 14 | description:`Server Prefix: ***${data.prefix}***`, 15 | thumbnail: { 16 | url: message.guild.iconURL({dynamic:true}) 17 | }, 18 | footer:{ 19 | text:`Requested by - ${message.author.username}`, 20 | iconURL:message.author.displayAvatarURL({dynamic:true}) 21 | }, 22 | timestamp: Date.now() 23 | 24 | }) 25 | 26 | }) 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /slashcmd/administration/unban.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'unban', 5 | description: 'unbans members', 6 | options:[ 7 | { 8 | name:'user', 9 | description:'Select user who you want to unban', 10 | type:'USER', 11 | required:true, 12 | } 13 | ], 14 | 15 | run: async (client, interaction) => { 16 | 17 | if(!interaction.member.permissions.has('BAN_MEMBERS')) return interaction.followUp({content:'Perms Denied'}) 18 | 19 | 20 | const user = interaction.options.getUser('user') 21 | 22 | 23 | const bannedMembers = await interaction.guild.bans.fetch() 24 | 25 | if(!bannedMembers.find((user) => user.user.id === user.id)) return interaction.followUp({content:'User is not banned from server'}) 26 | 27 | 28 | interaction.guild.members.unban(user.id); 29 | 30 | interaction.followUp({content:`Unbanned user ${id}`}) 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /commands/fun/enlarge.js: -------------------------------------------------------------------------------- 1 | 2 | const Discord = require("discord.js"); 3 | const { parse } = require("twemoji-parser"); 4 | 5 | module.exports = { 6 | 7 | name:'enlarge', 8 | description:'enlarges images', 9 | 10 | async execute(message,args,client){ 11 | 12 | const emoji = args[0]; 13 | if (!emoji) return message.channel.send("No emoji provided!"); 14 | 15 | let custom = Discord.Util.parseEmoji(emoji); 16 | const embed = new Discord.MessageEmbed() 17 | .setTitle(`Enlarged version of ${emoji}`) 18 | .setColor("#FFFF00"); 19 | 20 | if (custom.id) { 21 | embed.setImage(`https://cdn.discordapp.com/emojis/${custom.id}.${custom.animated ? "gif" : "png"}`); 22 | return message.channel.send({embeds:[embed]}); 23 | } 24 | else { 25 | let parsed = parse(emoji, { assetType: "png" }); 26 | if (!parsed[0]) return message.channel.send("Invalid emoji!"); 27 | 28 | embed.setImage(parsed[0].url); 29 | return message.channel.send({embeds:[embed]}); 30 | } 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /commands/administration/addrole.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | name: 'addrole', 5 | description: 'adds roles to users', 6 | 7 | async execute(message,args,client){ 8 | if(!message.member.permissions.has("MANAGE_ROLES")){ 9 | return message.channel.send({content:'Perms Denied'}) 10 | } 11 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 12 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 13 | } 14 | 15 | const target = message.mentions.members.first() 16 | if(!target){ 17 | return message.channel.send({content:"Please specify user"}) 18 | } 19 | const role = message.mentions.roles.first() 20 | 21 | if(!role){ 22 | return message.channel.send({content:"Please specify role to give"}) 23 | } 24 | 25 | await target.roles.add(role) 26 | 27 | message.channel.send({content:`${target.user.username} has been given a new role`}) 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /commands/images/googlemaps.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const fetch = require("node-fetch"); 3 | 4 | module.exports = { 5 | name: 'googlemaps', 6 | description:'Returns map of a location provided', 7 | 8 | 9 | async execute(message, args,client) { 10 | 11 | const sit = args.join("_") 12 | if (!args.length) return message.channel.send("Provide a valid location") 13 | const site = `https://maps.google.com/?q=${args.join("+")}` 14 | try { 15 | const msg = await message.channel.send('**Please wait...** This may take up to 10 seconds.') 16 | msg.delete({ timeout: 5000 }) 17 | const { body } = await fetch( 18 | `https://image.thum.io/get/width/1920/crop/675/noanimate/${site}` 19 | ); 20 | let att = new Discord.MessageAttachment(body, `${sit}.png`) 21 | return message.channel.send({files: [att]}); 22 | 23 | } catch (err) { 24 | 25 | return message 26 | .reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`) 27 | 28 | }; 29 | } 30 | } -------------------------------------------------------------------------------- /commands/administration/invite-off.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | const schema = require('../../schemas/anti-invite') 3 | 4 | 5 | module.exports = { 6 | name:'invite-off', 7 | description: 'Turns off anti-invite system', 8 | 9 | async execute(message, args,client){ 10 | 11 | if(!message.member.permissions.has('ADMINISTRATOR')) return message.channel.send({content:'Perms Denied'}) 12 | 13 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 14 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 15 | } 16 | const id = message.guild.id; 17 | 18 | schema.findOne({Server: id}, async(err, data) =>{ 19 | if(!data) return message.channel.send({content:'Server never had anti-invite off'}) 20 | 21 | data.delete() 22 | message.channel.send({content:`Anti-Invite has been turned off in ${message.guild.name}`}) 23 | }) 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /commands/owner/blacklist-remove.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | require("dotenv").config(); 3 | const ownerID = process.env.ownerid; 4 | const schema = require('../../schemas/blacklist-server') 5 | 6 | module.exports = { 7 | name:'blacklist-removes', 8 | description:'Removes Servers to Blacklist the Bot from(Owner Only)', 9 | 10 | async execute(message,args,client){ 11 | 12 | if(message.author.id !== ownerID) return; 13 | 14 | const id = args[0]; 15 | if(!id) return message.channel.send({content:"Please specify a server id to remove the blacklist"}) 16 | if(!client.guilds.cache.has(id)) return message.channel.send({content:"I am not in that server"}) 17 | schema.findOne({Server: id}, async(err, data) =>{ 18 | if(!data) return message.channel.send({content:'Server does not exist in database'}) 19 | 20 | data.delete() 21 | message.channel.send({content:`Guild ${id} has been removed from blacklist`}) 22 | }) 23 | 24 | 25 | } 26 | } -------------------------------------------------------------------------------- /commands/images/whowin.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | name:'whowin', 6 | description:'Who would win command', 7 | 8 | async execute(message,args,client){ 9 | 10 | const user1 = message.mentions.users.array()[0].displayAvatarURL({dynamic:false}) || message.author.displayAvatarURL({dynamic:false}); 11 | const user2 = message.mentions.users.array()[1].displayAvatarURL({dynamic:false}) || message.author.displayAvatarURL({dynamic:false}); 12 | 13 | 14 | if(!user1 || !user2) message.channel.send('Please provide two users to put on the poster') 15 | 16 | 17 | let res = await fetch(`https://nekobot.xyz/api/imagegen?type=whowouldwin&user1=${user1}&user2=${user2}`) 18 | 19 | let result = await res.json() 20 | 21 | 22 | const attachment = new Discord.MessageAttachment(result.message, 'whowouldwin.png') 23 | 24 | message.channel.send({files: [attachment]}); 25 | 26 | 27 | 28 | 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /commands/levels/leaderboard.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const Levels = require('discord-xp') 3 | 4 | 5 | module.exports = { 6 | name:'leaderboard', 7 | description:'Returns the top ten level leaderboard', 8 | 9 | async execute(message, args,client){ 10 | 11 | const rawLeaderboard = await Levels.fetchLeaderboard(message.guild.id, 10); 12 | 13 | if(rawLeaderboard.length < 1) return message.channel.send("Nobody is in current leaderboard") 14 | 15 | const leaderboard = await Levels.computeLeaderboard(client, rawLeaderboard, true); 16 | 17 | const lb = leaderboard.map(e => `**${e.position}. ${e.username}#${e.discriminator}**\n**Level: ${e.level}**\nXP: ${e.xp.toLocaleString()}`) 18 | 19 | const embed = new Discord.MessageEmbed() 20 | .setColor("RANDOM") 21 | .setTitle(`Leaderboard for ${message.guild.name}`) 22 | .setThumbnail(message.guild.iconURL()) 23 | .setDescription(lb.join("\n\n")) 24 | 25 | message.channel.send({embeds:[embed]}) 26 | } 27 | 28 | 29 | } -------------------------------------------------------------------------------- /commands/administration/delRank.js: -------------------------------------------------------------------------------- 1 | const RankSchema = require("../../schemas/ranks") 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'deleterank', 6 | description:'Deletes Role from Rank System', 7 | 8 | async execute(message,args,client){ 9 | 10 | if(!message.member.permissions.has('ADMINISTRATOR')) return message.channel.send({content:'Perms Denied'}) 11 | 12 | 13 | const rankName = args.join(" "); 14 | 15 | if(!rankName) return message.channel.send({content:'Please specify a role'}) 16 | 17 | 18 | RankSchema.findOne({Guild: message.guild.id, Rank:rankName}, async(err, data) => { 19 | if(data){ 20 | await RankSchema.findOneAndDelete({Guild: message.guild.id, Rank:rankName}) 21 | message.channel.send({content:'Rank has been deleted'}) 22 | } 23 | else{ 24 | return message.channel.send({content:'There isn\'t any data found for this rank'}) 25 | } 26 | }) 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /slashcmd/administration/transferowner.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | 4 | module.exports = { 5 | name:'transferowner', 6 | description: 'Transfers ownership of the guild', 7 | options:[ 8 | 9 | { 10 | name:'user', 11 | description:'User to transfer ownership to', 12 | type:'USER', 13 | required:true 14 | } 15 | 16 | ], 17 | 18 | run: async(client, interaction) => { 19 | 20 | if(interaction.user.id != interaction.guild.ownerID){ 21 | return interaction.followUp({content:'You must be the owner of the guild to use this command'}) 22 | } 23 | 24 | const user = interaction.options.getMember('user'); 25 | 26 | interaction.guild.setOwner(user) 27 | .then(guild => guild.fetchOwner()) 28 | .then(owner => interaction.followUp({content:`${user} is now the owner of the guild.`})) 29 | .catch(err => interaction.followUp({content:`Error: ${err}`})) 30 | 31 | } 32 | 33 | 34 | 35 | 36 | } -------------------------------------------------------------------------------- /commands/images/color.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const axios = require('axios') 3 | 4 | module.exports = { 5 | name:"color", 6 | description:'Shows Details on a Color', 7 | 8 | 9 | async execute(message, args,client) { 10 | 11 | 12 | 13 | 14 | let color = args[0] 15 | if(color.includes("#")){ 16 | color = args[0].split("#")[1]; 17 | } 18 | 19 | try{ 20 | const data = await axios.get(`https://api.alexflipnote.dev/colour/${color}`); 21 | 22 | const info = data.data; 23 | 24 | 25 | const embed = new Discord.MessageEmbed() 26 | .setTitle(info.name) 27 | .setDescription(`RGB Values: ${info.rgb}\n\nBrightness: ${info.brightness}\n\nHex: ${info.hex}`) 28 | .setThumbnail(info.image) 29 | .setImage(info.image_gradient) 30 | .setColor(info.hex) 31 | 32 | return message.channel.send({embeds:[embed]}); 33 | 34 | } catch(err){ 35 | message.channel.send("Not a valid color") 36 | } 37 | 38 | } 39 | 40 | 41 | 42 | } -------------------------------------------------------------------------------- /commands/administration/slowmode.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | const ms = require('ms') 3 | module.exports = { 4 | name: 'slowmode', 5 | description: 'enables slowmode in a channel', 6 | 7 | async execute(message, args, client){ 8 | 9 | if(!message.member.permissions.has('MANAGE_CHANNELS')) return message.channel.send({content:'Perms Denied'}) 10 | if(!args[0]){ 11 | message.channel.setRateLimitPerUser(0); 12 | return message.channel.send({content:'Slowmode has been removed'}) 13 | } 14 | 15 | const raw = args[0] 16 | const milliseconds = ms(raw) 17 | 18 | if(isNaN(milliseconds)) return message.channel.send({content:'Not a valid time'}) 19 | 20 | if(milliseconds < 1000) return message.channel.send({content:'Min slowmode is 1 second'}) 21 | 22 | message.channel.setRateLimitPerUser(milliseconds / 1000) 23 | 24 | message.channel.send({content: 25 | `The slowmode for this channel has been set to ${ms(milliseconds, { 26 | long: true, 27 | })}` 28 | }); 29 | 30 | 31 | 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /commands/owner/blacklist-add.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | require("dotenv").config(); 3 | const ownerID = process.env.ownerid; 4 | const schema = require('../../schemas/blacklist-server') 5 | 6 | module.exports = { 7 | name:'blacklist-add', 8 | description:'Adds Servers to Blacklist the Bot, causes commands to stop working in that set server(Owner Only)', 9 | 10 | async execute(message,args,client){ 11 | 12 | if(message.author.id !== ownerID) return; 13 | const id = args[0]; 14 | if(!id) return message.channel.send({content:"Please specify a server id to blacklist"}) 15 | if(!client.guilds.cache.has(id)) return message.channel.send({content:"I am not in that server"}) 16 | 17 | schema.findOne({Server: id}, async(err, data) =>{ 18 | if(data) return message.channel.send({content:"Server has already been blacklisted"}) 19 | 20 | new schema({ 21 | Server: id 22 | }).save() 23 | message.channel.send({content:`Blacklisted Server ${id}`}) 24 | }) 25 | 26 | } 27 | } -------------------------------------------------------------------------------- /commands/fun/kiss.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { Random } = require("something-random-on-discord"); 3 | const anime = require('anime-actions') 4 | 5 | module.exports = { 6 | name: "kiss", 7 | description: "Kiss another user", 8 | async execute(message, args,client){ 9 | 10 | try{ 11 | 12 | const target = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 13 | 14 | if(target.id == message.author.id){ 15 | return message.channel.send("You can't kiss yourself!") 16 | } 17 | 18 | let data = await Random.getAnimeImgURL("kiss") 19 | 20 | 21 | if(!target){ 22 | return message.channel.send("Who Will U Kiss? 💗") 23 | } 24 | 25 | let embed = new Discord.MessageEmbed() 26 | .setImage(data) 27 | .setColor("#2F3136") 28 | .setTitle(`${message.author.username} kisses ${target.user.username} \ 💖`) 29 | .setTimestamp() 30 | 31 | return message.channel.send({embeds:[embed]}); 32 | } catch(err){ 33 | console.log(err) 34 | message.channel.send("404 Error, please try again."); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /commands/images/amogus.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const Canvas = require('canvas'); 3 | module.exports = { 4 | name : 'amogus', 5 | description:'Amogus command', 6 | async execute(message,args,client) { 7 | 8 | try{ 9 | const member = message.mentions.members.first() || message.member; 10 | const avatar = await Canvas.loadImage(member.user.displayAvatarURL({ format: 'jpg' })); 11 | let bg = await Canvas.loadImage("https://github.com/katie07/Imagayes/blob/main/AMOGUS.png?raw=true") 12 | let knife = await Canvas.loadImage("https://github.com/katie07/Imagayes/blob/main/KNFIE.png?raw=true") 13 | const canvas = Canvas.createCanvas(1000, 1000); 14 | const ctx = canvas.getContext(`2d`); 15 | ctx.drawImage(avatar, 440, 200, 500, 290); 16 | ctx.drawImage(bg, 0, 0, 1000, 1000); 17 | ctx.drawImage(knife, 630, 400, 300, 300); 18 | 19 | const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'amogus.jpg'); 20 | message.channel.send({files : [attachment]}); 21 | }catch(e){ 22 | message.channel.send(`Error: ${e.message}`); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /commands/utility/allemoji.js: -------------------------------------------------------------------------------- 1 | 2 | const { MessageEmbed } = require("discord.js"); 3 | module.exports = { 4 | name: "allemoji", 5 | description: "View all emojis in the guild", 6 | async execute(message, args,client){ 7 | let Emojis = ""; 8 | let EmojisAnimated = ""; 9 | let EmojiCount = 0; 10 | let Animated = 0; 11 | let OverallEmojis = 0; 12 | function Emoji(id) { 13 | return client.emojis.cache.get(id).toString(); 14 | } 15 | message.guild.emojis.cache.forEach((emoji) => { 16 | OverallEmojis++; 17 | if (emoji.animated) { 18 | Animated++; 19 | EmojisAnimated += Emoji(emoji.id); 20 | } else { 21 | EmojiCount++; 22 | Emojis += Emoji(emoji.id); 23 | } 24 | }); 25 | let Embed = new MessageEmbed() 26 | .setTitle(`Emojis in ${message.guild.name}.`) 27 | .setDescription( 28 | `**Animated [${Animated}]**:\n${EmojisAnimated}\n\n**Standard [${EmojiCount}]**:\n${Emojis}\n\n**Over all emojis [${OverallEmojis}]**` 29 | ) 30 | .setColor(`RANDOM`); 31 | message.channel.send({embeds:[Embed]}); 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /commands/utility/multiemoji.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { parse } = require("twemoji-parser"); 3 | const { MessageEmbed } = require("discord.js"); 4 | module.exports = { 5 | name: "multiemoji", 6 | description: "Adds multiple emotes instead of singular ones", 7 | async execute(message, args,client){ 8 | 9 | const emojis = args.join(" ").match(/?/gi) 10 | if (!emojis) return message.channel.send(`:x: | **Provde The emojis to add**`); 11 | emojis.forEach(emote => { 12 | let emoji = Discord.Util.parseEmoji(emote); 13 | if (emoji.id) { 14 | const Link = `https://cdn.discordapp.com/emojis/${emoji.id}.${ 15 | emoji.animated ? "gif" : "png" 16 | }` 17 | message.guild.emojis.create( 18 | `${Link}`, 19 | `${`${emoji.name}`}` 20 | ).then(em => message.channel.send(em.toString() + " added!")).catch(error => { 21 | message.channel.send(":x: | an Error occured") 22 | console.log(error) 23 | }) 24 | 25 | } 26 | }) 27 | } 28 | } -------------------------------------------------------------------------------- /slashcmd/utility/url.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const wrapper = require('popcat-wrapper') 3 | 4 | module.exports = { 5 | name:'url', 6 | description:'Shortens URL', 7 | options:[ 8 | { 9 | name:'url', 10 | description:'URL to Shorten', 11 | type:'STRING', 12 | required:true, 13 | }, 14 | { 15 | name:'extension', 16 | description:'Extension for your url: for example www.hello.com/your extension', 17 | type:'STRING', 18 | required:true, 19 | } 20 | ], 21 | 22 | run:async(client, interaction) => { 23 | 24 | 25 | 26 | try{ 27 | const url = interaction.options.getString('url') 28 | const extension = interaction.options.getString('url') 29 | await wrapper.shorten(url, extension).then(url => { 30 | interaction.followUp({content:`Shortened URL: ${url}`}) 31 | }) 32 | } catch(err) { 33 | interaction.followUp({content:`An error occurred: ${err}`}) 34 | } 35 | 36 | 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /commands/administration/removecount.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/count') 2 | module.exports = { 3 | name:'removecount', 4 | description:'Disables Counting System', 5 | 6 | async execute(message, args, client){ 7 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Invalid Perms'}) 8 | 9 | const channel = message.mentions.channels.first() || message.channel 10 | 11 | 12 | Schema.findOne({Guild:message.guild.id}, async(err, data) => { 13 | if( channel != data.Channel) { 14 | message.channel.send({content: `Theres no Counting System Set in <#${channel.id}>`}) 15 | } 16 | if(!data) return message.channel.send({content: "Set a Counting Channel First"}) 17 | if(data) data.delete(); 18 | 19 | const deletedata = new Schema({ 20 | Guild:message.guild.id, 21 | Channel:channel.id, 22 | Count:0 23 | }) 24 | deletedata.delete(); 25 | message.channel.send({content: `Counting system Disabled.`}) 26 | }) 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /slashcmd/serversetup/setupcount.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'setupcount', 5 | description:'Sets a counting game to a channel', 6 | category: "serversetup", 7 | permissions: ['ADMINISTRATOR'], 8 | options: [ 9 | { 10 | name: "channel", 11 | description: "Select A Channel for Counting", 12 | type: "CHANNEL", 13 | required: true 14 | } 15 | ], 16 | /** 17 | * 18 | * @param {Client} client 19 | * @param {CommandInteraction} interaction 20 | */ 21 | run:async (client, interaction) =>{ 22 | 23 | const channel = interaction.options.getChannel("channel"); 24 | 25 | Schema.findOne({Guild:interaction.guild.id}, async(err, data) => { 26 | if(data) data.delete(); 27 | 28 | new Schema({ 29 | Guild:interaction.guild.id, 30 | Channel:channel.id, 31 | Count:0 32 | }).save(); 33 | 34 | 35 | interaction.reply({content:`Saved Counting Channel to ${channel}`}) 36 | }) 37 | 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /commands/fun/roast.js: -------------------------------------------------------------------------------- 1 | const fetch = require("node-fetch"); 2 | const Discord = require("discord.js"); 3 | // Test 4 | module.exports = { 5 | name: "roast", 6 | description: "Roast Another User", 7 | async execute(message, args, client) { 8 | 9 | 10 | const mentionedUser = message.mentions.users.first(); 11 | 12 | if (!mentionedUser){ 13 | 14 | return message.channel.send("No user Mentioned"); 15 | } 16 | else{ 17 | 18 | fetch("https://evilinsult.com/generate_insult.php?lang=en&type=json") 19 | .then((res) => res.json()) 20 | .then((json) => { 21 | const roastEmbed = new Discord.MessageEmbed() 22 | .setTitle( 23 | `${message.author.tag}'s roast to ` + mentionedUser.tag 24 | ) 25 | .setDescription(json.insult) 26 | .setTimestamp() 27 | 28 | .setFooter('Evil Insult API') 29 | 30 | return message.channel.send({embeds:[roastEmbed]}); 31 | 32 | 33 | }); 34 | 35 | } 36 | }, 37 | }; 38 | -------------------------------------------------------------------------------- /slashcmd/administration/hackban.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "hackban", 5 | description: "Bans a user outside the server.", 6 | permission:'ADMINISTRATOR', 7 | options:[ 8 | { 9 | name: "user", 10 | description: "The ID of the user to ban.", 11 | type:'STRING', 12 | required: true 13 | }, 14 | { 15 | name: "reason", 16 | description: "The reason for the ban.", 17 | type:'STRING', 18 | required: true 19 | } 20 | ], 21 | run: async (client, interaction) => { 22 | const user = interaction.options.getString('user'); 23 | const reason = interaction.options.getString('reason'); 24 | 25 | interaction.guild.members.ban(user, {reason: reason.target < 1 ? "No reason provided." : reason}); 26 | 27 | const embed = new MessageEmbed() 28 | .setTitle("Hackban Successful") 29 | .setDescription(`User ${user} has been banned.`) 30 | 31 | interaction.followUp({embeds:[embed]}); 32 | 33 | } 34 | } -------------------------------------------------------------------------------- /commands/administration/channelLock.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | module.exports = { 3 | 4 | name:'channellock', 5 | description: 'Locks Down Channels', 6 | 7 | async execute(message,args,client){ 8 | if(!message.member.permissions.has('MANAGE_CHANNELS')) return message.channel.send({content:'Perms Denied'}) 9 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 10 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 11 | } 12 | 13 | if(!args[0]) return message.channel.send({content:'Please mention a channel'}) 14 | 15 | const role = message.guild.roles.everyone; 16 | 17 | let lockChannel = message.mentions.channels.first() 18 | 19 | if(!lockChannel) return message.channel.send({content:'Please provide a valid channel'}) 20 | 21 | await lockChannel.updateOverwrite(role, { 22 | SEND_MESSAGES: false 23 | }).catch(err => console.log(err)) 24 | 25 | return message.channel.send({content:'This channel has been locked'}) 26 | 27 | 28 | } 29 | 30 | 31 | } -------------------------------------------------------------------------------- /commands/utility/afk.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js'); 2 | const db = require('../../schemas/afk'); 3 | 4 | module.exports = { 5 | name: 'afk', 6 | descriptoon:'AFK System', 7 | async execute(message, args,client){ 8 | const afkreason = args.slice(0).join(' ') || 'No reason'; 9 | db.findOne({ Guild: message.guild.id, Member: message.author.id }, async(err, data) => { 10 | if(data) { 11 | return; 12 | } else { 13 | data = new db({ 14 | Guild: message.guild.id, 15 | Member: message.author.id, 16 | Content: afkreason, 17 | TimeAgo: Date.now() 18 | }) 19 | data.save() 20 | const afksave = new MessageEmbed() 21 | .setTitle(`${message.author.tag} is now afk`) 22 | .setDescription( `\`\`\`${afkreason}\`\`\``) 23 | .setColor("RANDOM") 24 | .setThumbnail(message.author.displayAvatarURL({dynamic: true})) 25 | .setFooter(message.author.tag, message.author.displayAvatarURL({ dynamic: true })) 26 | .setTimestamp() 27 | 28 | message.channel.send({ embeds: [afksave]}) 29 | } 30 | }) 31 | } 32 | } -------------------------------------------------------------------------------- /commands/administration/voicekick.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "voicekick", 3 | description:"Kicks a member out of a voice channel", 4 | async execute(message, args,client){ 5 | 6 | if (!message.guild.me.permissions.has(["ADMINISTRATOR"])) 7 | return message.channel.send({content: 8 | "Invalid perms to run command" 9 | }).then(m => m.delete({timeout: 10000})); 10 | if (!message.member.permissions.has(["MOVE_MEMBERS"])) return message.channel.send({content:"You cannot use this command due to invalid perms"}).then(m => m.delete({timeout: 10000})); 11 | 12 | let user = message.mentions.members.first() 13 | 14 | if (!user) 15 | return message.channel.send({content: 16 | `Please mention user to kick from VC` 17 | }).then(m => m.delete({timeout: 10000})); 18 | 19 | 20 | let { channel } = user.voice; 21 | 22 | if (!channel) return message.channel.send({content:`User Is Not In Any Voice Channel!`}); 23 | 24 | user.voice.kick(); 25 | 26 | message.channel.send({content:`${user.user.username} has been kicked from ${channel}`}).then(m => m.delete({timeout: 10000})); 27 | } 28 | }; -------------------------------------------------------------------------------- /commands/administration/kick.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:"kick", 6 | description: "kicks members from server", 7 | 8 | async execute(message,args, client){ 9 | 10 | 11 | if(!message.member.permissions.has('BAN_MEMBERS')) return message.channel.send({content:'Perms Denied'}) 12 | 13 | const member = message.mentions.members.first() 14 | 15 | if(!member) return message.channel.send({content:'Please specify a member to ban'}) 16 | 17 | if( 18 | message.member.roles.highest.position <= member.roles.highest.position 19 | ) return message.channel.send({content:'You cannot kick people who are at the same role level or higher role level than you'}) 20 | 21 | let reason = args.slice(1).join(" ") || "No Reason" 22 | 23 | 24 | 25 | const kickembed = new Discord.MessageEmbed() 26 | .setTitle(`User Kicked`) 27 | .addField('Reason', [ 28 | `${reason}` 29 | ]) 30 | .setTimestamp() 31 | .setFooter(message.author.tag, message.author.displayAvatarURL({dynamic:true})) 32 | 33 | member.kick() 34 | 35 | 36 | 37 | 38 | 39 | return message.channel.send({embeds: [kickembed]}); 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /commands/administration/channelUnlock.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | module.exports = { 3 | 4 | name:'channelunlock', 5 | description: 'Unlocks channels that are in lock down', 6 | 7 | async execute(message,args,client){ 8 | if(!message.member.permissions.has('MANAGE_CHANNELS')) return message.channel.send({content:'Perms Denied'}) 9 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 10 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 11 | } 12 | 13 | if(!args[0]) return message.channel.send({content:'Please mention a channel'}) 14 | 15 | const role = message.guild.roles.everyone; 16 | 17 | let lockChannel = message.mentions.channels.first() 18 | 19 | if(!lockChannel) return message.channel.send({content:'Please provide a valid channel'}) 20 | 21 | await lockChannel.updateOverwrite(role, { 22 | SEND_MESSAGES: true 23 | 24 | }).catch(err => console.log(err)) 25 | 26 | 27 | return message.channel.send({content:'This channel has been unlocked'}) 28 | 29 | 30 | } 31 | 32 | 33 | } -------------------------------------------------------------------------------- /commands/images/wallpaper.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const Discord = require('discord.js'); 3 | require('dotenv').config(); 4 | const api = process.env.serpapi 5 | 6 | module.exports = { 7 | 8 | name:'wallpaper', 9 | description:'Returns a wallpaper from HDQWalls', 10 | 11 | 12 | async execute(message, args,client){ 13 | 14 | try{ 15 | 16 | const query = args.join(" "); 17 | 18 | if(!query) return message.channel.send('Please provide query to search for') 19 | 20 | axios.get(`https://serpapi.com/search.json?engine=google&q=${query + ' wallpaper' + ' high resolution'}&tbm=isch&ijn=0&api_key=${api}`) 21 | .then(res => { 22 | const num = Math.floor((Math.random()) * 20); 23 | 24 | const rand = res.data.images_results[num].original; 25 | 26 | const embed = new Discord.MessageEmbed() 27 | .setTitle(`Here is your wallpaper`) 28 | .setImage(rand) 29 | .setColor('#000488') 30 | .setTimestamp() 31 | 32 | message.channel.send({embeds:[embed]}) 33 | }) 34 | 35 | 36 | 37 | }catch(err){ 38 | console.log(err) 39 | } 40 | 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /slashcmd/administration/removewarn.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | const Schema = require("../../schemas/warn"); 3 | 4 | module.exports = { 5 | name: "removewarn", 6 | description: "Removes Single Warning", 7 | permission: "ADMINISTRATOR", 8 | options: [ 9 | { 10 | name: "warnid", 11 | description: "ID of Warnings, use /warnings, to get the warn ID", 12 | type: "STRING", 13 | required: true, 14 | }, 15 | ], 16 | run: async (client, interaction) => { 17 | const id = interaction.options.getString("Warn ID"); 18 | 19 | if(!interaction.guild.me.permissions.has('ADMINISTRATOR')){ 20 | return interaction.followUp({ content: 'I do not have the right permissions to run this command'}) 21 | } 22 | 23 | 24 | 25 | const warn = await Schema.findById(id); 26 | 27 | if (!warn) { 28 | return interaction.followUp({ 29 | content: `${id} is not a valid warning id`, 30 | }); 31 | } 32 | warn.delete(); 33 | 34 | const user = interaction.guild.cache.users.get(warn.userId); 35 | interaction.followUp({ 36 | content: `1 Warning has been removed from ${user}`, 37 | }); 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /slashcmd/administration/setmuterole.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, MessageActionRow, MessageButton, MessageEmbed} = require('discord.js') 2 | const db = require('../../schemas/mute') 3 | 4 | module.exports = { 5 | name: 'setmuterole', 6 | description: 'Set the role that will be given to be users to be Muted', 7 | permission:'ADMINISTRATOR', 8 | options: [ 9 | { 10 | name: 'role', 11 | description: 'The role to set as the mute role.', 12 | type: 'ROLE', 13 | required: true 14 | } 15 | ], 16 | 17 | run:async(client, interaction) => { 18 | const role = interaction.options.getRole('role') 19 | const data = await db.findOne({Guild: interaction.guild.id}) 20 | if (!data) { 21 | await db.create({ 22 | Guild: interaction.guild.id, 23 | Role: role.id 24 | }) 25 | return interaction.reply({content: `Set the mute role to ${role.toString()}`}) 26 | } else { 27 | await db.findOneAndUpdate({Guild: interaction.guild.id}, {Role: role.id}) 28 | return interaction.reply({content: `Changed the mute role to ${role.toString()}`}) 29 | } 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /commands/administration/setwelcome.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/welcomeChannel') 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | const mongoose = require('mongoose') 4 | 5 | 6 | module.exports = { 7 | 8 | name:'setwelcome', 9 | description:'sets a welcome channel', 10 | 11 | async execute(message,args,client){ 12 | if(!(message.member.permissions.has('ADMINSTRATOR'))) return message.channel.send({content:"Perms Denied"}) 13 | const channel = message.mentions.channels.first() 14 | if(!channel) return message.channel.send({content:"Please mention a channel"}) 15 | Schema.findOne({Guild: message.guild.id}, async(err, data) => { 16 | try{ 17 | if(data){ 18 | data.Channel = channel.id; 19 | data.save(); 20 | } else { 21 | new Schema({ 22 | Guild: message.guild.id, 23 | Channel: channel.id 24 | }).save(); 25 | } 26 | 27 | message.channel.send({content:`${channel} has been set as the welcome channel`}) 28 | } catch(err){ 29 | console.log(err) 30 | } 31 | }) 32 | 33 | 34 | 35 | } 36 | } -------------------------------------------------------------------------------- /slashcmd/music/removesong.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:'removesong', 6 | description:'Remove Song Depending on Queue Index(Number)', 7 | options:[ 8 | { 9 | name:'number', 10 | description:'Song number to be removed', 11 | type:'NUMBER', 12 | required:true 13 | } 14 | ], 15 | 16 | run:async(client, interaction) => { 17 | 18 | const index = interaction.options.getNumber('number') - 1; 19 | 20 | let queue = client.player.getQueue(interaction.guild.id); 21 | 22 | if(index >= queue.songs.length){ 23 | return interaction.followUp({content:`Index ${index} is out of range`, ephemeral: true}) 24 | } 25 | else if(index < 0){ 26 | return interaction.followUp({content:`Index ${index} is out of range`, ephemeral: true}) 27 | 28 | 29 | 30 | } 31 | 32 | 33 | const song = queue.songs[index].name 34 | 35 | 36 | queue = queue.songs.splice(index, 1); 37 | 38 | return interaction.followUp({content:`Removed Song ${song} from queue`, ephemeral: true}) 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /commands/administration/checkChannel.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/welcomeChannel') 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | const mongoose = require('mongoose') 4 | 5 | 6 | module.exports = { 7 | name:'check-channel', 8 | description:'checks for welcome channel', 9 | 10 | async execute(message,args,client){ 11 | 12 | 13 | if(!(message.member.permissions.has('ADMINSTRATOR'))) return message.channel.send({content:"Perms Denied"}) 14 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 15 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 16 | } 17 | 18 | try{ 19 | 20 | Schema.findOne({Guild: message.guild.id}, async(err, data) => { 21 | try{ 22 | if(!data) return message.channel.send({content:'This guild has no data stored'}) 23 | 24 | const channel = client.channels.cache.get(data.Channel) 25 | 26 | message.channel.send({content:`Welcome Channel => ${channel}`}) 27 | } catch(err){ 28 | console.log(err); 29 | } 30 | }) 31 | 32 | 33 | } catch(err){ 34 | console.log(err) 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /commands/utility/translate.js: -------------------------------------------------------------------------------- 1 | const translate = require('@iamtraction/google-translate'); 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'translate', 6 | description: 'Translate command', 7 | async execute(message,args, client){ 8 | 9 | const option = args[0]; 10 | 11 | try{ 12 | if(option){ 13 | const input = args.slice(1).join(" "); 14 | if(!input) return message.channel.send("Please specify text to translate") 15 | 16 | const translated = await translate(input, {to: option}) 17 | 18 | 19 | const translatedEmbed = new MessageEmbed() 20 | .setTitle(`${message.author.username}'s Translation`) 21 | .addFields( 22 | { name: `Original Text`, value: `\`\`\`${input}\`\`\``, inline:true}, 23 | { name: `Language`, value:`\`\`\`${option}\`\`\``, inline:false}, 24 | { name: `Translated Text`, value: `\`\`\`${translated.text}\`\`\``, inline:false} 25 | ) 26 | .setColor("RANDOM") 27 | .setTimestamp() 28 | 29 | 30 | 31 | return message.channel.send({embeds:[translatedEmbed]}); 32 | 33 | } 34 | } catch(err){ 35 | console.log(err) 36 | message.channel.send("Error") 37 | 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /commands/administration/listbans.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = { 4 | name:'listbans', 5 | description:'Lists Banned Users in a Guild', 6 | 7 | 8 | async execute(message, args,client){ 9 | 10 | if (!message.member.permissions.has("BAN_MEMBERS")) { 11 | return message.channel.send({content:"Invalid Perms"}); 12 | } 13 | if (!message.guild.me.permissions.has("BAN_MEMBERS")) { 14 | return message.channel.send({content:"I do not have permission to access this command"}); 15 | } 16 | 17 | var amount = 1; 18 | const fetchBans = message.guild.bans.fetch() 19 | const bannedMembers = (await fetchBans) 20 | .map((member) => `${amount++} **${member.user.username}** | (*${member.user.id}*)`) 21 | .join("\n"); 22 | const bansEmbed = new Discord.MessageEmbed() 23 | .setAuthor(`Banned Members in ${message.guild.name}`, message.guild.iconURL({ dynamic: true })) 24 | .setDescription(`${bannedMembers}`) 25 | .setFooter(`Amount: ${amount - 1}`) 26 | .setTimestamp() 27 | .setColor("RANDOM") 28 | return message.channel.send({embeds:[bansEmbed]}) 29 | 30 | 31 | 32 | 33 | 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /commands/utility/google.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const request = require('node-superfetch'); 3 | require('dotenv').config(); 4 | const google = process.env.google; 5 | 6 | module.exports = { 7 | 8 | name:"google", 9 | descriptions:"searches on google", 10 | 11 | async execute(message,args,client){ 12 | 13 | let googleKey = google; 14 | let csx = "e07debb6d8725ce79"; 15 | let query = args.join(" "); 16 | let result; 17 | 18 | if(!query){ 19 | return message.channel.send("Please Enter a Query"); 20 | 21 | } 22 | href = await search(query); 23 | 24 | if(!href){ 25 | return message.channel.send("Cannot Find Query"); 26 | } 27 | 28 | const embed = new Discord.MessageEmbed() 29 | .setTitle(href.title) 30 | .setDescription(href.snippet) 31 | .setImage(href.pagemap ? href.pagemap.cse_thumbnail[0].src : null) 32 | .setURL(href.link) 33 | .setFooter("Powered by Google") 34 | 35 | return message.channel.send({embeds:[embed]}); 36 | 37 | async function search(query){ 38 | const { body } = await request.get("https://www.googleapis.com/customsearch/v1").query({ 39 | key: googleKey, cx: csx, safe:"off", q:query 40 | }); 41 | if(!body.items){ 42 | return null 43 | } 44 | return body.items[0]; 45 | } 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /commands/fun/urban-dictionary.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const axios = require('axios') 3 | 4 | module.exports = { 5 | name:"urban", 6 | description:'Looks Up Stuff on Urban Dictionary', 7 | 8 | async execute(message,args,client){ 9 | let query = args.join(" "); 10 | 11 | if(!query){ 12 | return message.channel.send('Please specify word to look up') 13 | } 14 | query = encodeURIComponent(query) 15 | 16 | try{ 17 | 18 | const { 19 | data: {list} 20 | } = await axios.get( 21 | `https://api.urbandictionary.com/v0/define?term=${query}` 22 | ); 23 | const [answer] = list; 24 | 25 | const embed = new MessageEmbed() 26 | .setTitle(answer.word) 27 | .setURL(answer.permalink) 28 | .setColor('RANDOM') 29 | .addField('DEFINITION', trim(answer.definition)) 30 | .addField('EXAMPLE', trim(answer.example)) 31 | .addField( 32 | "RATINGS", 33 | `${answer.thumbs_up} 👍 || ${answer.thumbs_down} 👎` 34 | ) 35 | 36 | return message.channel.send({embeds:[embed]}); 37 | } catch(err){ 38 | return message.channel.send("Word not found") 39 | } 40 | 41 | } 42 | } 43 | 44 | function trim(input){ 45 | return input.length > 1024 ? `${input.slice(0, 1020)} ... ` : input; 46 | } 47 | -------------------------------------------------------------------------------- /commands/administration/clearwarns.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/warn') 2 | 3 | module.exports = { 4 | 5 | name:'clearwarn', 6 | description:'Removes all of the users warnings', 7 | 8 | async execute(message,args,client){ 9 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Perms denied'}) 10 | 11 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 12 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 13 | } 14 | 15 | const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 16 | if(!user) return message.channel.send({content:'Member not found'}) 17 | 18 | Schema.findOne({guildid: message.guild.id, user: user.user.id}, async(err, data) => { 19 | if(err) return message.channel.send({content:'Something went wrong'}) 20 | 21 | if(data){ 22 | await Schema.findOneAndDelete({user:user.user.id, guildid: message.guild.id}) 23 | message.channel.send({content:`Cleared ${user.user.tag}'s warnings`}) 24 | } else{ 25 | message.channel.send({content:'Users warns cleared'}) 26 | } 27 | 28 | }) 29 | } 30 | } -------------------------------------------------------------------------------- /slashcmd/administration/seticon.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction, MessageEmbed} = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'seticon', 5 | description: 'Set the icon of the server', 6 | permission:'ADMINISTRATOR', 7 | options: [ 8 | { 9 | name: 'icon', 10 | description: 'The icon to set', 11 | type:'STRING', 12 | required:true 13 | } 14 | ], 15 | 16 | run:async(client,interaction) => { 17 | const id = interaction.guild.ownerId; 18 | 19 | if(!id){ 20 | const embed = new MessageEmbed() 21 | .setTitle('Permission Error') 22 | .setDescription('Only Owner of Server Can Change the Server Icon') 23 | .setColor('RED') 24 | .setTimestamp() 25 | 26 | return interaction.followUp({embeds:[embed]}) 27 | } 28 | else{ 29 | const icon = interaction.options.getString('icon') 30 | interaction.guild.setIcon(icon); 31 | 32 | const newicon = new MessageEmbed() 33 | .setTitle('Icon Changed') 34 | .setImage(icon) 35 | .setTimestamp() 36 | 37 | return interaction.followUp({embeds:[newicon]}) 38 | 39 | 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /slashcmd/administration/createrole.js: -------------------------------------------------------------------------------- 1 | const {MessageEmbed, Client, CommandInteraction } = require("discord.js"); 2 | const toHex = require('colornames') 3 | module.exports = { 4 | name:'createrole', 5 | description:'Create a Role', 6 | permission:'MANAGE_ROLES', 7 | options:[ 8 | { 9 | name:'name', 10 | description:'The name of the role', 11 | type:'STRING', 12 | required:true 13 | }, 14 | { 15 | name:'color', 16 | description:'The color of the role', 17 | type:'STRING', 18 | required:true 19 | }, 20 | 21 | 22 | ], 23 | 24 | run:async(client, interaction) => { 25 | 26 | 27 | const name = interaction.options.getString('name') 28 | const color = interaction.options.getString('color') 29 | 30 | const hex = toHex(color); 31 | 32 | const role = await interaction.guild.roles.create({ 33 | name: name, 34 | color: hex, 35 | 36 | }) 37 | 38 | 39 | const embed = new MessageEmbed() 40 | .setTitle('Role Created') 41 | .setDescription(`Role ${role.name} created with the color ${role.color}`) 42 | .setColor(role.color) 43 | 44 | interaction.followUp({embeds: [embed]}) 45 | 46 | 47 | 48 | 49 | 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /slashcmd/administration/resetcount.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'resetcount', 5 | description:'Resets the counting.', 6 | category: "administration", 7 | permissions: ['ADMINISTRATOR'], 8 | options: [ 9 | { 10 | name: "channel", 11 | description: "Select A Channel for Counting", 12 | type: "CHANNEL", 13 | required: true 14 | } 15 | ], 16 | /** 17 | * 18 | * @param {Client} client 19 | * @param {CommandInteraction} interaction 20 | */ 21 | run:async (client, interaction) =>{ 22 | 23 | const channel = interaction.options.getChannel("channel"); 24 | 25 | 26 | Schema.findOne({Guild:interaction.guild.id}, async(err, data) => { 27 | if( channel != data.Channel) { 28 | interaction.reply({content: `Theres no Counting System Set in <#${channel.id}>`, ephemeral:true}) 29 | } 30 | if(!data) return interaction.reply({content: "Set a Counting Channel First", ephemeral:true}) 31 | if(data) { data.Count = 0; //Reset Game to 0 32 | data.UserID = null; //Reset User ID in Database 33 | await data.save(); 34 | interaction.reply({content:`Counting System Resetted.`}) 35 | } 36 | }); 37 | 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /slashcmd/administration/kick.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "kick", 5 | description: "kicks a member from server", 6 | permission: "ADMINISTRATOR", 7 | options: [ 8 | { 9 | name: "target", 10 | description: "User to be kicked", 11 | type: "USER", 12 | required: true, 13 | }, 14 | 15 | { 16 | name: "reason", 17 | description: "Reason for kick", 18 | type: "STRING", 19 | required: false, 20 | }, 21 | ], 22 | 23 | run: async (client, interaction) => { 24 | const user = interaction.options.getMember("target"); 25 | const reason = interaction.options.getString("reason") || "No Reason"; 26 | 27 | if ( 28 | interaction.member.roles.highest.position <= user.roles.highest.position 29 | ) 30 | return interaction.followUp({ 31 | content: 32 | "You cannot kick people who are at the same role level or higher role level than you", 33 | }); 34 | 35 | user.kick({ reason: reason }); 36 | 37 | const embed = new MessageEmbed() 38 | .setTitle("Member Kicked") 39 | .setDescription( 40 | `✅ Member ${user.user.username} kicked from ${interaction.guild.name} for ${reason}` 41 | ) 42 | .setTimestamp(); 43 | 44 | interaction.followUp({ embeds: [embed] }); 45 | }, 46 | }; 47 | -------------------------------------------------------------------------------- /slashcmd/serversetup/removereaction.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/reactionRoles'); 2 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 3 | 4 | module.exports = { 5 | name:'removereaction', 6 | description:'Removes Custom Role Reaction', 7 | permissions:'MANAGE_ROLES', 8 | options:[ 9 | { 10 | name:'role', 11 | description:'role to be removed', 12 | type:'ROLE', 13 | required: true, 14 | 15 | }, 16 | ], 17 | 18 | run:async(client, interaction) => { 19 | const role = interaction.options.getRole('role'); 20 | 21 | const data = await Schema.findOne({guildId: interaction.guildId}); 22 | 23 | if(!data){ 24 | interaction.followUp({content:'Role Reaction has not been set up in this server'}); 25 | } 26 | 27 | const guildRoles = data.roles; 28 | 29 | const found = guildRoles.find(x => x.roleId === role.id); 30 | 31 | if(!found){ 32 | interaction.followUp({content:'That Role does not have a role reaction in this server'}); 33 | } 34 | const filter = guildRoles.filter(x => x.roleId !== role.id); 35 | data.roles = filter; 36 | 37 | await data.save(); 38 | 39 | 40 | interaction.followUp({content:`Removed: ${role.name} from role reaction system`}) 41 | 42 | 43 | } 44 | } -------------------------------------------------------------------------------- /commands/utility/ytsearch.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const ytsr = require('ytsr') 3 | 4 | module.exports = { 5 | name: 'ytsearch', 6 | description: 'Search For Videos On YouTube', 7 | 8 | async execute(message, args, client) { 9 | 10 | const query = args.join(' '); 11 | if (!query) return message.channel.send("Provide a search for me to search YouTube!"); 12 | 13 | const res = await ytsr(query).catch(e => message.channel.send(`No results found for ${query}`)); 14 | const video = res.items.filter(i => i.type === 'video')[0]; 15 | const embed = new Discord.MessageEmbed() 16 | .setTitle(video.title) 17 | .setURL(video.url) 18 | .setImage(video.bestThumbnail.url) 19 | .setColor("RANDOM") 20 | .setDescription(video.description ? video.description : "No Description") 21 | .addField(`Song Information`, 22 | `**Creator**: [${video.author.name}](${video.author.url}) ${video.author.verified ? ":white_check_mark: (Verified)" : "Not-Verified"} 23 | **Length**: ${video.duration} minute(s) 24 | **Uploaded**: ${video.uploadedAt} 25 | **Views**: ${video.views.toLocaleString()}`,false 26 | ) 27 | .setThumbnail(video.author.bestAvatar.url) 28 | return message.channel.send({embeds:[embed]}); 29 | } 30 | } -------------------------------------------------------------------------------- /slashcmd/music/jump.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction, MessageEmbed} = require('discord.js'); 2 | 3 | module.exports = { 4 | name:'jump', 5 | description:'Jump to a specific song in the queue', 6 | options:[ 7 | { 8 | name:'index', 9 | description:'The index of the song to jump to', 10 | type:'NUMBER', 11 | required:true 12 | } 13 | ], 14 | run:async(client,interaction) => { 15 | 16 | 17 | const vc = interaction.member.voice.channel 18 | 19 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 20 | 21 | let queue = client.player.getQueue(interaction.guild.id); 22 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 23 | 24 | let index = interaction.options.getNumber('index') 25 | 26 | if(index <= 0) return interaction.followUp({content:`Cannot have smaller than 0 index`}) 27 | 28 | if(index == 1) return interaction.followUp({content:`You are already playing the first song`}) 29 | 30 | if(index > queue.songs.length) return interaction.followUp({content:`Index ${index} is out of range`}) 31 | 32 | while(index){ 33 | await queue.skip(); 34 | index--; 35 | } 36 | return interaction.followUp({content:`Now Playing: ${queue.songs[1].name}`}) 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /slashcmd/music/listqueue.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/queueSchema'); 3 | 4 | 5 | module.exports = { 6 | name:'listqueue', 7 | description:'Lists all saved queues', 8 | 9 | run:async(client, interaction) =>{ 10 | 11 | 12 | await Schema.find({Guild: interaction.guild.id}, async (err, data)=>{ 13 | 14 | let name = [] 15 | let queuelen = [] 16 | 17 | let desc = "" 18 | let counter = 0; 19 | 20 | const len = Object.keys(data).length / 7; 21 | for(let i = 0; i < len; i++) { 22 | name.push(data[i].Name) 23 | for(let j = 0; j < data[i].Queue.length; j++){ 24 | counter++; 25 | } 26 | queuelen.push(counter); 27 | } 28 | 29 | for(i = 0; i { 20 | let url = interaction.options.getString('url') 21 | try { 22 | if (url.length < 8) 23 | return interaction.followUp(`"https is too short to reach - 8 limit"`) 24 | 25 | const site = /^(https?:\/\/)/i.test(url) ? url : `http://${url}` 26 | 27 | const { body } = await fetch(`https://image.thum.io/get/width/1950/crop/700/noanimate/${site}`) 28 | 29 | 30 | interaction.followUp({ 31 | embeds: [ 32 | new MessageEmbed() 33 | .addField(`Screenshotted!`, `[The site](${site})`) 34 | .setImage(`attachment://screenshot.png`) 35 | ], 36 | files: [ body ] 37 | }) 38 | } catch(err) { 39 | interaction.followUp(`Error: ${err}`) 40 | } 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /commands/fun/emoji.js: -------------------------------------------------------------------------------- 1 | const { Client, Message, MessageEmbed } = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'emoji', 5 | description:'turns words into emoji', 6 | /** 7 | * @param {Client} client 8 | * @param {Message} message 9 | * @param {String[]} args 10 | */ 11 | async execute(message, args, client){ 12 | if(!args.length){ 13 | return message.channel.send('Please enter something to change') 14 | } 15 | const specialCodes = { 16 | '0': ':zero:', 17 | '1': ':one:', 18 | '2': ':two:', 19 | '3': ':three:', 20 | '4': ':four:', 21 | '5': ':five:', 22 | '6': ':six:', 23 | '7': ':seven:', 24 | '8': ':eight:', 25 | '9': ':nine:', 26 | '#': ':hash:', 27 | '*': ':asterisk:', 28 | '?': ':grey_question:', 29 | '!': ':grey_exclamation:', 30 | ' ': ' ' 31 | } 32 | const text = args.join(" ").toLowerCase().split('').map(character => { 33 | if(/[a-z]/g.test(character)) { 34 | return `:regional_indicator_${character}:` 35 | } else if (specialCodes[character]) { 36 | return `${specialCodes[character]}` 37 | } 38 | return character; 39 | }).join(''); 40 | 41 | message.channel.send({content:text}) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /slashcmd/administration/setcount.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'setcount', 5 | description:'Sets the next Count Number', 6 | category: "administration", 7 | permissions: ['ADMINISTRATOR'], 8 | options: [ 9 | { 10 | name: "channel", 11 | description: "Select A Channel for Counting", 12 | type: "CHANNEL", 13 | required: true 14 | }, 15 | { 16 | name: "number", 17 | description: "Set a number for the count", 18 | type: "INTEGER", 19 | required: true 20 | } 21 | ], 22 | /** 23 | * 24 | * @param {Client} client 25 | * @param {CommandInteraction} interaction 26 | */ 27 | run:async (client, interaction) =>{ 28 | const channel = interaction.options.getChannel("channel"); 29 | const number = interaction.options.getInteger("number") 30 | 31 | if(isNaN(number)) return interaction.reply({content:"Set a positive Number"}) 32 | Schema.findOne({Guild:interaction.guild.id}, async(err, data) => { 33 | if( channel != data.Channel) { 34 | interaction.reply({content: `Theres no Counting System Set in <#${channel.id}>`, ephemeral:true}) 35 | } 36 | if(data) { data.Count = number - 1; 37 | await data.save(); 38 | interaction.reply({content:`Next Number Set to ${number}`}) 39 | } 40 | 41 | }) 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /slashcmd/administration/slowmode.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const ms = require('ms') 3 | 4 | module.exports = { 5 | 6 | name:'slowmode', 7 | description: 'Enables slowmode in a channel', 8 | permission: 'MANAGE_CHANNELS', 9 | options:[ 10 | 11 | { 12 | name:'time', 13 | description:'Time for slowmode(Set it to 0, to have no slowmode)', 14 | type:'STRING', 15 | required:true 16 | } 17 | ], 18 | 19 | /** 20 | * 21 | * @param {Client} client 22 | * @param {Interaction} interaction 23 | */ 24 | 25 | run:async(client, interaction) => { 26 | 27 | const time = interaction.options.getString('time') 28 | 29 | if(time === '0'){ 30 | interaction.channel.setRateLimitPerUser(0) 31 | return interaction.followUp({content: 'Slowmode has been turned off'}); 32 | } 33 | 34 | const milliseconds = ms(time) 35 | 36 | if(isNaN(milliseconds)) return interaction.followUp({content:'Not a valid time'}) 37 | 38 | if(milliseconds < 1000) return interaction.followUp({content:'Min slowmode time is 1 second'}) 39 | 40 | interaction.channel.setRateLimitPerUser(milliseconds / 1000) 41 | 42 | interaction.followUp({content:`The slowmode for this channel has been set to ${ms(milliseconds, { 43 | long: true, 44 | })}`}) 45 | 46 | 47 | 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /slashcmd/administration/removecount.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client} = require('discord.js') 2 | const Schema = require('../../schemas/count') 3 | module.exports = { 4 | name:'removecount', 5 | description:'Disables Counting System', 6 | category: "administration", 7 | permissions: ['ADMINISTRATOR'], 8 | options: [ 9 | { 10 | name: "channel", 11 | description: "Select A Channel for Counting", 12 | type: "CHANNEL", 13 | required: true 14 | } 15 | ], 16 | /** 17 | * 18 | * @param {Client} client 19 | * @param {CommandInteraction} interaction 20 | */ 21 | run:async (client, interaction) =>{ 22 | 23 | const channel = interaction.options.getChannel("channel"); 24 | 25 | 26 | 27 | Schema.findOne({Guild:interaction.guild.id}, async(err, data) => { 28 | if( channel != data.Channel) { 29 | interaction.reply({content: `Theres no Counting System Set in <#${channel.id}>`, ephemeral:true}) 30 | } 31 | if(!data) return interaction.reply({content: "Set a Counting Channel First", ephemeral:true}) 32 | if(data) data.delete(); 33 | 34 | const deletedata = new Schema({ 35 | Guild:interaction.guild.id, 36 | Channel:channel.id, 37 | Count:0 38 | }) 39 | deletedata.delete(); 40 | interaction.reply({content:`Counting system Disabled.`}) 41 | }) 42 | 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /commands/administration/addRank.js: -------------------------------------------------------------------------------- 1 | 2 | const RankSchema = require("../../schemas/ranks") 3 | const {Client, Message, MessageEmbed} = require('discord.js') 4 | 5 | module.exports = { 6 | name:'addrank', 7 | description:'Adds Role Rank System', 8 | 9 | async execute(message,args,client){ 10 | 11 | if(!message.member.permissions.has('ADMINISTRATOR')) return; 12 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 13 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 14 | } 15 | 16 | const role = message.mentions.roles.first() 17 | const rankName = args.slice(1).join(" "); 18 | 19 | if(!role) return message.channel.send({content:'Please specify a role'}) 20 | if(!rankName) return message.channel.send({content:'Please specify a role'}) 21 | 22 | 23 | RankSchema.findOne({Guild: message.guild.id, Rank:rankName}, async(err, data) => { 24 | if(data) return message.channel.send({content:'Rank Already Exists'}) 25 | else{ 26 | data = new RankSchema({ 27 | Guild: message.guild.id, 28 | Rank: rankName, 29 | Role: role.id 30 | }); 31 | data.save(); 32 | 33 | message.channel.send({content:`${role} is new rank -> ${rankName}`}) 34 | } 35 | }) 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /slashcmd/serversetup/rolepanel.js: -------------------------------------------------------------------------------- 1 | const Schema = require("../../schemas/reactionRoles"); 2 | const { 3 | CommandInteraction, 4 | Client, 5 | MessageEmbed, 6 | MessageActionRow, 7 | MessageSelectMenu, 8 | } = require("discord.js"); 9 | 10 | module.exports = { 11 | name: "rolepanel", 12 | description: "Displays a panel of role reaction", 13 | permissions: "MANAGE_ROLES", 14 | 15 | run: async (client, interaction) => { 16 | Schema.findOne({ guildId: interaction.guildId }, async(err,data) => { 17 | 18 | if (!data?.roles) { 19 | return interaction.followUp({ 20 | content: "Role Reaction has not been setup in this server", 21 | }); 22 | } 23 | 24 | const options = data.roles.map((x) => { 25 | const role = interaction.guild.roles.cache.get(x.roleId); 26 | 27 | return { 28 | label: role.name, 29 | value: role.id, 30 | description: x.description, 31 | emoji: x.emoji, 32 | }; 33 | }); 34 | 35 | const panel = new MessageEmbed() 36 | .setTitle("Please Select A Role") 37 | .setColor("RED"); 38 | 39 | const components = [ 40 | new MessageActionRow().addComponents( 41 | new MessageSelectMenu() 42 | .setCustomId("reaction-roles") 43 | .setMaxValues(1) 44 | .addOptions(options) 45 | ), 46 | ]; 47 | 48 | 49 | interaction.followUp({embeds:[panel], components}) 50 | 51 | 52 | 53 | }); 54 | 55 | 56 | 57 | 58 | }, 59 | }; 60 | -------------------------------------------------------------------------------- /slashcmd/utility/giphy.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const apikey = process.env.giphy 3 | const giphy = require("giphy-api")(apikey); 4 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 5 | 6 | module.exports = { 7 | name: "giphy", 8 | description: "Search for a gif from giphy", 9 | options:[ 10 | { 11 | name:'query', 12 | description:'The query to search gifs for', 13 | type:'STRING', 14 | required:true 15 | } 16 | ], 17 | 18 | /** 19 | * @param {CommandInteraction} interaction 20 | * @param {Client} client 21 | */ 22 | 23 | run: async(client, interaction) => { 24 | 25 | const query = interaction.options.getString('query'); 26 | 27 | try{ 28 | giphy.search(query).then(function(response) { 29 | console.log(response) 30 | let id = response.data[0].id; 31 | let url = `https://media.giphy.com/media/${id}/giphy.gif` 32 | 33 | const embed = new MessageEmbed() 34 | .setColor(client.color.midnightblue) 35 | .setImage(url) 36 | .setFooter(interaction.guild.name, interaction.guild.iconURL()) 37 | .setTimestamp() 38 | 39 | 40 | interaction.followUp({embeds:[embed]}) 41 | 42 | }) 43 | } 44 | catch(error){ 45 | interaction.followUp({content:'API Error has occured'}) 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /commands/administration/lockdown.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | 3 | 4 | module.exports = { 5 | name:"lockdown", 6 | description:"locks down server(admin only)", 7 | 8 | 9 | async execute(message, args,client){ 10 | 11 | if(!message.member.permissions.has("ADMINSTRATOR")) return message.channel.send({content:"Only admins can use this"}) 12 | 13 | 14 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 15 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 16 | } 17 | 18 | const role = message.guild.roles.everyone; 19 | 20 | if(!args.length) return message.channel.send({content:"Please reply to either lockdown or to not"}) 21 | 22 | const query = args[0].toLowerCase(); 23 | 24 | 25 | if(!["true", "false"].includes(query)){ 26 | return message.channel.send({content:"Option is not valid"}) 27 | } 28 | 29 | const perms = role.permissions.toArray(); 30 | if(query == "false"){ 31 | perms.push('SEND_MESSAGES') 32 | console.log(perms) 33 | await role.edit({permissions:perms}); 34 | message.channel.send({content:"Server is unlocked"}) 35 | } else { 36 | const newPerms = perms.filter((perm) => perm !== 'SEND_MESSAGES') 37 | console.log(newPerms) 38 | 39 | await role.edit({permissions:newPerms}) 40 | message.channel.send({content:"Server is now locked"}) 41 | 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /commands/administration/unmute.js: -------------------------------------------------------------------------------- 1 | const {Message} = require('discord.js') 2 | const Schema = require('../../schemas/mute') 3 | 4 | module.exports = { 5 | 6 | name: 'unmute', 7 | description: 'unmutes users', 8 | async execute(message,args, client){ 9 | 10 | if(!message.member.permissions.has('MANAGE_MESSAGES')) return message.channel.send({content:'You do not have permissions to use this command'}) 11 | const Member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 12 | 13 | if(!Member) return message.channel.send({content:'Member is not found.'}) 14 | 15 | const role = message.guild.roles.cache.find(r => r.name.toLowerCase() === 'muted'); 16 | 17 | 18 | Schema.findOne({ 19 | Guild:message.guild.id 20 | }, 21 | 22 | async(err, data) => { 23 | if(!data) return message.channel.send({content:"Member was not muted"}) 24 | 25 | const user = data.Users.findIndex((prop) => prop === Member.id) 26 | 27 | if(user == -1 ) return message.channel.send({content:"Member is not muted"}) 28 | 29 | data.Users.splice(user,1); 30 | 31 | data.save() 32 | await Member.roles.remove(role) 33 | 34 | message.channel.send({content:`${Member.displayName} has been unmuted`}) 35 | } 36 | 37 | 38 | ) 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | message.channel.send(`${Member.displayName} has been unmuted`) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /slashcmd/utility/inviteme.js: -------------------------------------------------------------------------------- 1 | const { Client, Interaction, MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); 2 | 3 | 4 | const env = { 5 | SUPPORT_SERVER_ON: true, 6 | SUPPORT_SERVER: "https://discord.gg/nN3KQxt5Xr", 7 | permissions: ["ADMINISTRATOR"], 8 | scopes: ["applications.commands", "bot"] 9 | } 10 | 11 | module.exports = { 12 | name: "inviteme", 13 | description: "Get Links To Invite Me", 14 | type: "CHAT_INPUT", 15 | /** 16 | * 17 | * @param {Client} client 18 | * @param {Interaction} interaction 19 | */ 20 | run: async (client, interaction) => { 21 | try { 22 | let embed = new MessageEmbed().setColor("WHITE"); 23 | 24 | 25 | let row = new MessageActionRow().addComponents( 26 | 27 | new MessageButton() 28 | .setLabel("Invite Me!") 29 | .setURL(client.generateInvite({ scopes: env.scopes, permissions: env.permissions })) 30 | .setStyle("LINK"), 31 | ); 32 | 33 | if(env.SUPPORT_SERVER_ON){ 34 | row.addComponents( 35 | new MessageButton() 36 | .setLabel("Support Server") 37 | .setStyle("LINK") 38 | .setURL(env.SUPPORT_SERVER) 39 | 40 | 41 | ) 42 | } 43 | embed.setDescription(`Take Your Links`); 44 | 45 | await interaction.followUp({ embeds: [embed], components: [row] }); 46 | } catch (err) { 47 | console.log("Something Went Wrong => ", err); 48 | } 49 | }, 50 | }; -------------------------------------------------------------------------------- /commands/administration/delwarn.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/warn') 2 | 3 | module.exports = { 4 | 5 | name:'removewarn', 6 | description:'Removes a users warning', 7 | 8 | async execute(message,args,client){ 9 | 10 | try{ 11 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Perms denied'}) 12 | 13 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 14 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 15 | } 16 | 17 | const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 18 | if(!user) return message.channel.send({content:'Member not found'}) 19 | 20 | Schema.findOne({guildid: message.guild.id, user: user.user.id}, async(err, data) => { 21 | if(err) return message.channel.send({content:'Something went wrong'}) 22 | 23 | if(data){ 24 | let num = parseInt(args[1]) - 1; 25 | data.content.splice(num, 1) 26 | 27 | message.channel.send({content:`Warning number ${num} deleted`}) 28 | 29 | data.save() 30 | } else{ 31 | message.channel.send({content:'User does not have any warns'}) 32 | } 33 | 34 | }) 35 | 36 | }catch(err){ 37 | console.log(err); 38 | message.channel.send("I do not have perms to use this command"); 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /slashcmd/administration/advpurge.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "advpurge", 5 | description: "Advance Purge With User Number Deleted Messages", 6 | permission: "ADMINISTRATOR", 7 | options: [ 8 | { 9 | name: "messages", 10 | description: "Enter a number of messages to clear(up to 300 messages)", 11 | type: "NUMBER", 12 | required: true, 13 | }, 14 | ], 15 | 16 | run: async (client, interaction) => { 17 | let messages = interaction.options.getNumber("messages"); 18 | 19 | if (messages > 100) { 20 | messages = messages - 100; 21 | } 22 | 23 | const fetch = await interaction.channel.messages.fetch({ limit: messages }); 24 | const deletedMessages = await interaction.channel.bulkDelete(fetch, true); 25 | 26 | const results = {}; 27 | for (const [, deleted] of deletedMessages) { 28 | const user = `${deleted.author.username}#${deleted.author.discriminator}`; 29 | if (!results[user]) results[user] = 0; 30 | if (deleted.author.bot) results[user] = 0; 31 | results[user]++; 32 | } 33 | 34 | const userMessageMap = Object.entries(results); 35 | 36 | const finalResult = `${deletedMessages.size} message${ 37 | deletedMessages.size > 1 ? "s" : "" 38 | } were removed!\n\n${userMessageMap 39 | .map(([user, messages]) => `**${user}** : ${messages}`) 40 | .join("\n")}`; 41 | await interaction.channel.send({ content: finalResult }); 42 | }, 43 | }; 44 | -------------------------------------------------------------------------------- /commands/administration/vcunban.js: -------------------------------------------------------------------------------- 1 | const { Client, Message, MessageEmbed, MessageReaction } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: 'vcunban', 5 | description:'Unbans members from connecting to VC', 6 | async execute(message, args,client) { 7 | if(!message.member.permissions.has('MANAGE_ROLES')) return message.channel.send({content:'Perms denied'}); 8 | 9 | const target = message.mentions.members.first() || message.guild.members.cache.get(args[0]); 10 | if(!target) return message.reply({content:'Please tell me the member who should not be prevented from joining the vc'}); 11 | 12 | if(target.id === message.author.id) return message.reply({content:"You cannot unantivc yourself!"}) 13 | 14 | let role = message.guild.roles.cache.find((role) => role.name.toLowerCase() === 'antivc'); 15 | if(!role) return message.reply({content:"Anti-Vc role doesn't exist"}); 16 | 17 | if(!target.roles.cache.has(role.id)) return message.reply({content:`${target} was not event prevented from joining the vc in the first place.`}); 18 | 19 | target.roles.remove(role.id) 20 | const embed = new MessageEmbed() 21 | .setTitle('Member unbanned from VC') 22 | .setDescription(`${target.displayName} is now able to connect to VC`) 23 | .setThumbnail(message.mentions.users.first().displayAvatarURL({dynamic:true})) 24 | .setColor("RANDOM") 25 | .setFooter(message.author.username, message.author.displayAvatarURL({dynamic: true})) 26 | .setTimestamp() 27 | return message.channel.send({embeds:[embed]}) 28 | } 29 | } -------------------------------------------------------------------------------- /commands/gameinfo/champrotate.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const axios = require('axios'); 3 | require('dotenv').config() 4 | const token = process.env.riot 5 | const championName = require('./lolchamp.js'); 6 | 7 | 8 | module.exports = { 9 | 10 | name:'champrotate', 11 | description:"Shows Current Free Champion Rotation(LoL)", 12 | 13 | async execute(message, args,client) { 14 | 15 | 16 | const info = axios.get(`https://euw1.api.riotgames.com/lol/platform/v3/champion-rotations?api_key=${token}`) 17 | .then(response => { 18 | 19 | var myChampions = []; 20 | var championId = ""; 21 | var dataToPush = ""; 22 | 23 | 24 | for(var i = 0; i<14; i++){ 25 | championId = championName.getChampionName(response.data.freeChampionIds[i]) 26 | dataToPush = championId; 27 | myChampions.push(`${i+1}) ${dataToPush}`); 28 | } 29 | 30 | var embed = new Discord.MessageEmbed() 31 | .addField("Free champion rotation: ", `\`\`\`${myChampions.join('\n')}\`\`\``, true) 32 | .addField("Powered by: ", `[developer.riotgames.com](https://developer.riotgames.com/)`) 33 | .setTimestamp() 34 | .setColor("0x#FF0000") 35 | return message.channel.send({embeds:[embed]}); 36 | 37 | 38 | 39 | }) 40 | 41 | 42 | 43 | 44 | } 45 | 46 | 47 | 48 | 49 | } -------------------------------------------------------------------------------- /commands/administration/hackban.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | 3 | module.exports = { 4 | name:"hackban", 5 | description:"Ban members outside the server", 6 | 7 | async execute(message,args,client){ 8 | 9 | var perms = message.member.permissions.has("BAN_MEMBERS"); 10 | if(!perms) return message.channel.send({content:"Perms Denied"}) 11 | 12 | if(!message.guild.me.permissions.has("BAN_MEMBERS")) return message.channel.send({content:"I do not have perms"}) 13 | 14 | const reason = args.slice(1).join(" ") || "No reason provided"; 15 | const id = args.join(' ') 16 | if(!id) return message.channel.send({content:"Please provide ID of member to ban"}) 17 | 18 | const member = await client.users.fetch(id); 19 | message.guild.members.ban(member.id); 20 | 21 | 22 | const banEmbed = new Discord.MessageEmbed() 23 | .setTitle('Outside of Server Ban') 24 | .setDescription(`${member.username} was successfully banned.`) 25 | .addField('Moderator', message.author.username, true) 26 | .addField('Member', member.username, true) 27 | .setColor("RANDOM") 28 | .addField('Reason', reason) 29 | .setThumbnail(member.displayAvatarURL({dynamic:true})) 30 | .setFooter(message.author.username, message.author.displayAvatarURL({ 31 | dynamic: true 32 | })) 33 | .setTimestamp() 34 | 35 | 36 | return message.channel.send({embeds:[banEmbed]}) 37 | } 38 | } -------------------------------------------------------------------------------- /slashcmd/music/loadqueue.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/queueSchema'); 3 | 4 | module.exports = { 5 | 6 | name: 'loadqueue', 7 | description: 'Loads the queue from the database', 8 | options:[ 9 | { 10 | name:'name', 11 | description:'The name of the queue to load', 12 | type:'STRING', 13 | required:true 14 | } 15 | 16 | ], 17 | 18 | run:async(client, interaction) =>{ 19 | 20 | 21 | const name = interaction.options.getString('name'); 22 | 23 | const vc = interaction.member.voice.channel 24 | await Schema.findOne({Guild:interaction.guild.id, Name:String(name)}, async (err, data)=> { 25 | 26 | let queue = client.player.createQueue(interaction.guild.id, { 27 | data: interaction}); 28 | await queue.join(vc) 29 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}); 30 | if(!data) return interaction.followUp({content:`Queue with name ${name} not found`}); 31 | 32 | 33 | const loadqueue = data.Queue; 34 | 35 | interaction.followUp({content:`Loaded queue ${name}`}) 36 | for(let i = 0; i < loadqueue.length; i++){ 37 | await queue.play(loadqueue[i]).catch(_ => { 38 | if(!queue) 39 | queue.stop(); 40 | }); 41 | } 42 | 43 | 44 | 45 | 46 | 47 | }) 48 | } 49 | } -------------------------------------------------------------------------------- /commands/administration/createMemberChannel.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/member-count') 3 | 4 | module.exports = { 5 | name: 'createmember', 6 | description:'creates a member count channel', 7 | 8 | async execute(message,args,client){ 9 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Perms Denied'}) 10 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 11 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 12 | } 13 | Schema.findOne({Guild : message.guild.id}, async(err, data) => { 14 | try{ 15 | if(data) data.delete() 16 | 17 | const channel = await message.guild.channels.create( 18 | `Members: ${message.guild.memberCount}`, 19 | { 20 | type:'Voice', 21 | permissionsOverwrites:[ 22 | { 23 | 24 | id:message.guild.id, 25 | deny:['CONNECT'], 26 | } 27 | ], 28 | 29 | 30 | } 31 | ); 32 | 33 | new Schema({ 34 | Guild: message.guild.id, 35 | Channel:channel.id, 36 | Member: message.guild.memberCount 37 | }).save() 38 | } catch(err){ 39 | console.log(err) 40 | } 41 | }) 42 | } 43 | 44 | 45 | } -------------------------------------------------------------------------------- /slashcmd/serversetup/captcha.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/captcha') 2 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name: 'captcha', 6 | description: 'Sets up Captcha Verification System in Server mode', 7 | permission: 'MANAGE_MEMBERS', 8 | options:[ 9 | { 10 | name:'role', 11 | description:'Role to be given to users who pass the captcha', 12 | type:'ROLE', 13 | required:true 14 | } 15 | ], 16 | 17 | /** 18 | * 19 | * @param {Client} client 20 | * @param {Interaction} CommandInteraction 21 | */ 22 | 23 | 24 | run:async(client, interaction) => { 25 | 26 | const role = interaction.options.getRole("role"); 27 | 28 | console.log(role); 29 | 30 | await Schema.findOne({Guild:interaction.guild.id}, async (err, data) => { 31 | if(data) { 32 | await data.delete(); 33 | } 34 | else{ 35 | new Schema({ 36 | Guild:interaction.guild.id, 37 | Role:role 38 | }).save() 39 | 40 | } 41 | 42 | }) 43 | 44 | let embed = new MessageEmbed() 45 | .setAuthor(`Captcha Setup Done`, client.user.displayAvatarURL()) 46 | .setDescription(`Captcha's Will Be Sent To Users when joining the server`) 47 | .setColor("BLURPLE") 48 | 49 | interaction.followUp({ embeds: [embed] }); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /slashcmd/fun/bulbapedia.js: -------------------------------------------------------------------------------- 1 | const request = require('node-superfetch'); 2 | const {Message, MessageEmbed, CommandInteraction} = require('discord.js') 3 | module.exports = { 4 | 5 | name: 'bulbapedia', 6 | description: 'Search Bulbapedia', 7 | options:[ 8 | { 9 | name: 'query', 10 | description: 'The query to search for', 11 | type:"STRING", 12 | required: true 13 | } 14 | ], 15 | run: async(client, interaction) => { 16 | const query = interaction.options.getString('query'); 17 | 18 | const { body } = await request 19 | .get('https://bulbapedia.bulbagarden.net/w/api.php') 20 | .query({ 21 | action: 'query', 22 | prop: 'extracts|pageimages', 23 | format: 'json', 24 | titles: query, 25 | exintro: '', 26 | explaintext: '', 27 | pithumbsize: 150, 28 | redirects: '', 29 | formatversion: 2 30 | }); 31 | const data = body.query.pages[0]; 32 | if (data.missing) return interaction.followUp('Could not find any results.'); 33 | const embed = new MessageEmbed() 34 | .setColor(0x3E7614) 35 | .setTitle(data.title) 36 | .setAuthor({name:'Bulbapedia', iconURL:'https://i.imgur.com/ePpoeFA.png', url:'https://bulbapedia.bulbagarden.net/'}) 37 | .setThumbnail(data.thumbnail ? data.thumbnail.source : null) 38 | .setURL(`https://bulbapedia.bulbagarden.net/wiki/${encodeURIComponent(query).replaceAll(')', '%29')}`) 39 | 40 | interaction.followUp({embeds:[embed]}); 41 | } 42 | 43 | 44 | 45 | } -------------------------------------------------------------------------------- /commands/utility/avatar.js: -------------------------------------------------------------------------------- 1 | const {MessageEmbed} = require("discord.js") 2 | module.exports = { 3 | name: "avatar", 4 | description:'Returns Avatar of User With and Without Pinging', 5 | async execute(message, args,client){ 6 | const user = 7 | message.mentions.members.first() || 8 | message.guild.members.cache.get(args[0]) || 9 | message.guild.members.cache.find((u) => 10 | u.user.username.toLowerCase().includes( 11 | args.join(" ") || u.user.tag.toLowerCase() === args.join(" ") 12 | ) 13 | ) || 14 | message.member || message.guild.members.cache.find((u) => 15 | u.user.username.toUpperCase().includes( 16 | args.join(" ") || u.user.tag.toLowerCase() === args.join(" ") 17 | ) 18 | ) 19 | const pngFormat = user.user.displayAvatarURL({ format: "png" }); 20 | const jpgFormat = user.user.displayAvatarURL({ format: "jpg" }); 21 | const format1024 = user.user.displayAvatarURL({dynamic: true, size:1024}); 22 | const format2048 = user.user.displayAvatarURL({dynamic: true, size:2048}); 23 | const format4096 = user.user.displayAvatarURL({dynamic: true, size:4096}); 24 | const webpFormat = user.user.displayAvatarURL(); 25 | const avatar = user.user.displayAvatarURL({ dynamic: true, size:4096}); 26 | message.channel.send({embeds:[ 27 | new MessageEmbed() 28 | .setTitle(`${user.user.username}'s avatar`) 29 | .setDescription( 30 | `[png](${pngFormat}) | [jpg](${jpgFormat}) | [webp](${webpFormat}) | [1024](${format1024}) | [2048](${format2048}) | [4096](${format4096})` 31 | ) 32 | .setImage(avatar) 33 | ]}); 34 | }, 35 | }; -------------------------------------------------------------------------------- /commands/administration/ban.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed}= require('discord.js') 2 | 3 | module.exports = { 4 | 5 | name:"ban", 6 | description: "Bans members from server", 7 | 8 | async execute(message,args, client){ 9 | 10 | if(!message.member.permissions.has('BAN_MEMBERS')) return message.channel.send({content:'Perms Denied'}) 11 | if(!message.member.id === message.guild.owner.id) return message.channel.send({content:`Only the owner of ${message.guild.name} Can run that command`}) 12 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 13 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 14 | } 15 | 16 | const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 17 | 18 | 19 | if(!member) return message.channel.send({content:'Please specify a member to ban'}) 20 | 21 | if( 22 | message.member.roles.highest.position <= member.roles.highest.position 23 | ) return message.channel.send({content:'You cannot ban people who are at the same role level or higher role level than you'}) 24 | 25 | const reason = args.slice(1).join(' ') || "No Reason" 26 | 27 | 28 | 29 | const embed = new MessageEmbed() 30 | .setTitle(`User banned`) 31 | .addField('Reason', [ 32 | `${reason}` 33 | ]) 34 | .setTimestamp() 35 | .setFooter(message.author.tag, message.author.displayAvatarURL({dynamic:true})) 36 | 37 | 38 | member.ban(); 39 | 40 | 41 | 42 | return message.channel.send({embeds:[embed]}) 43 | 44 | 45 | 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /slashcmd/utility/record.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const fs = require('fs'); 3 | 4 | module.exports = { 5 | name:'record', 6 | description:'Records stuff in VC', 7 | options:[ 8 | { 9 | name:'name', 10 | description:'Name of the recording', 11 | type:'STRING', 12 | required:true 13 | } 14 | ], 15 | 16 | run: async (client, interaction) => { 17 | const name = interaction.options.getString('name'); 18 | const voiceChannel = interaction?.member?.voice.channel; 19 | if (!voiceChannel) { 20 | return interaction.reply('You need to be in a voice channel to use this command.'); 21 | } 22 | const permissions = voiceChannel.permissionsFor(interaction.guild.me); 23 | if (!permissions.has('CONNECT') || !permissions.has('SPEAK')) { 24 | return interaction.reply('I need the permissions to join and speak in that voice channel.'); 25 | } 26 | 27 | const voicechannel = interaction?.member?.voice.channel; 28 | const connection = await interaction?.member?.voice.channel.join(); 29 | const receiver = connection?.receiver.createStream(interaction.member, { 30 | mode: 'pcm', 31 | end:'silence' 32 | }) 33 | 34 | const writer = receiver?.pipe(fs.createWriteStream(`./recordings-${name}.pcm`)); 35 | writer.on('finish', () => { 36 | interaction?.member?.voice?.channel?.leave(); 37 | interaction.followUp("Finished Writing Audio, saved in recordings") 38 | }) 39 | 40 | 41 | 42 | } 43 | } -------------------------------------------------------------------------------- /commands/fun/howgay.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | const fetch = require("node-fetch"); 3 | 4 | module.exports = { 5 | name: 'howgay', 6 | description: 'Gay Rate Command', 7 | async execute(message, args,client){ 8 | 9 | try{ 10 | const member = message.mentions.users.first() || message.author; 11 | const user = member.displayAvatarURL({dynamic:false, format:'png'}) 12 | let gayrate = Math.floor(Math.random() * 101) 13 | 14 | let image = " "; 15 | 16 | image = await fetch(`https://luminabot.xyz/api/image/gay?image=${user}`) 17 | .then(response => 18 | image = response.url 19 | ) 20 | 21 | if(gayrate >=70){ 22 | 23 | let embed = new Discord.MessageEmbed() 24 | .setTitle("Gayrate Machine") 25 | .setColor("#000000") 26 | .setImage(image) 27 | .setDescription(`${member.username} is \`${gayrate}%\` gay 🏳️‍🌈`) 28 | .setFooter({text:message.client.user.username, iconURL: message.client.user.avatarURL()}) 29 | message.channel.send({embeds:[embed]}) 30 | 31 | 32 | } 33 | else{ 34 | 35 | 36 | let embed = new Discord.MessageEmbed() 37 | .setTitle("Gayrate Machine") 38 | .setColor("RANDOM") 39 | .setDescription(`${member.username} is \`${gayrate}%\` gay 🏳️‍🌈`) 40 | .setFooter({text:message.client.user.username, iconURL: message.client.user.avatarURL()}) 41 | message.channel.send({embeds:[embed]}) 42 | } 43 | } catch(err){ 44 | message.channel.send("API Error") 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /commands/utility/year.js: -------------------------------------------------------------------------------- 1 | let canvas = require('canvas'); 2 | 3 | module.exports = { 4 | name:'year', 5 | description:'Displays Year So Far', 6 | 7 | async execute(message,args,client){ 8 | let date = message.createdAt; 9 | let cy = date.getUTCFullYear(); 10 | let notLeap = cy % 4; 11 | function getProgress(d){ 12 | let full = 31536000; 13 | let total = 0; 14 | if (!notLeap){ 15 | full += 86400; 16 | if (d.getUTCMonth() >= 2) total += 86400; 17 | } 18 | let monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30]; 19 | total += monthDays.slice(0, d.getUTCMonth()).reduce((a, b) => a + b, 0) * 86400; 20 | total += (d.getUTCDate()-1) * 86400; 21 | total += d.getUTCHours() * 3600; 22 | total += d.getUTCMinutes() * 60; 23 | total += d.getUTCSeconds(); 24 | return total * 100 / full; 25 | 26 | 27 | 28 | } 29 | function round(n, k){ 30 | let factor = 10**k; 31 | return Math.round(n*factor)/factor; 32 | } 33 | let cv = canvas.createCanvas(400, 40); 34 | let ctx = cv.getContext('2d'); 35 | ctx.fillStyle = '#000000'; ctx.fillRect(0, 0, 400, 40); 36 | ctx.fillStyle = '#747f8d'; ctx.fillRect(5, 5, 390, 30); 37 | ctx.fillStyle = '#43b581'; ctx.fillRect(5, 5, (Math.floor(390/100 * getProgress(date))), 30); 38 | message.channel.send({content:`**${cy}** is **${round(getProgress(date), 13)}%** complete.`, files:[ {attachment: cv.toBuffer(), name: 'yearprogress.jpg' }]}); 39 | } 40 | } -------------------------------------------------------------------------------- /commands/utility/perms.js: -------------------------------------------------------------------------------- 1 | const { Client, Message, MessageEmbed } = require("discord.js"); 2 | module.exports = { 3 | name: "perms", 4 | description: "View your server and channel perms!", 5 | async execute(message,args ,client){ 6 | 7 | const mem = message.mentions.members.first() || message.author 8 | member = await message.guild.members 9 | .fetch(mem.id) 10 | .catch(err => console.log(err)); 11 | if (!member) { 12 | return message.channel.send(`\\❌ User not found.`); 13 | } 14 | const sp = member.permissions.serialize(); 15 | const channelperm = message.channel.permissionsFor(member).serialize(); 16 | return message.channel.send({embeds:[ 17 | new MessageEmbed() 18 | .setColor(member.displayColor || "GREY") 19 | .setTitle(`${member.displayName}'s Permissions`) 20 | .setDescription( 21 | [ 22 | "\\♨️ - This Server", 23 | "\\#️⃣ - The Current Channel", 24 | "```properties", 25 | " ♨️ | #️⃣ | Permission", 26 | "========================================", 27 | `${Object.keys(sp) 28 | .map((perm) => 29 | [ 30 | sp[perm] ? " ✅ |" : " ❌ |", 31 | channelperm[perm] ? " ✅ |" : " ❌|", 32 | perm 33 | .split("_") 34 | .map((x) => x[0] + x.slice(1).toLowerCase()) 35 | .join(" "), 36 | ].join(" ") 37 | ) 38 | .join("\n")}`, 39 | "```", 40 | ].join("\n") 41 | ) 42 | ]}); 43 | }, 44 | }; 45 | -------------------------------------------------------------------------------- /commands/owner/pythoneval.js: -------------------------------------------------------------------------------- 1 | let { PythonShell } = require("python-shell"); 2 | const {MessageEmbed} = require('discord.js') 3 | require("dotenv").config(); 4 | const owner = process.env.ownerid 5 | 6 | module.exports = { 7 | name: "pyeval", 8 | description: "Python Eval Command(Owner Only)", 9 | async execute(message,args,client) { 10 | if (message.author.id !== owner) return; 11 | var input = args.join(" "); 12 | if (!input) { 13 | 14 | return message.reply({ 15 | embeds: [new MessageEmbed() .setTitle("Warning") .setDescription("There is nothing to be pyevaled") 16 | ], 17 | }); 18 | } 19 | let options = { 20 | mode: "text", 21 | path:"/usr/bin/python3" 22 | }; 23 | let pshell = PythonShell.runString(input, options, function (err) { 24 | if (err) 25 | return message.reply({ 26 | embeds: [ new MessageEmbed() .setTitle("PYTHON EVAL ERROR") .addField("Command:", `\n\`\`\`py\n${input}\n\`\`\``) .addField("RESULT:", `\n\`\`\`${err}\`\`\`` ) 27 | ], 28 | }); 29 | }); 30 | pshell.on("error", function (err) { 31 | if (err) 32 | return message.reply({ 33 | embeds: [ new MessageEmbed() .setTitle("PYTHON EVAL ERROR") .addField("Command:", `\n\`\`\`py\n${input}\n\`\`\``) .addField("RESULT:", `\n\`\`\`${err}\`\`\`` ) 34 | ], 35 | }); 36 | }); 37 | pshell.on("message", function (output) { 38 | message.reply({ 39 | embeds: [ new MessageEmbed() .setTitle("PYTHON EVAL") .setDescription(`**RESULT: **\n\`\`\`${output.toString()}\`\`\``) .addField("Command:", `\n\`\`\`py\n${input}\n\`\`\``) .setColor("BLUE") 40 | ], 41 | }); 42 | }); 43 | }, 44 | }; -------------------------------------------------------------------------------- /slashcmd/music/loop.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'loop', 5 | description:'Loops Song/Queue', 6 | options:[ 7 | { 8 | name:'choice', 9 | description:'Loop Choice(Single Song/Queue)', 10 | type:'STRING', 11 | required:true, 12 | choices:[ 13 | { 14 | name:'off', 15 | value:'0', 16 | 17 | }, 18 | { 19 | name:'song', 20 | value:'1' 21 | }, 22 | { 23 | 24 | name:'queue', 25 | value:'2' 26 | 27 | } 28 | ] 29 | 30 | } 31 | ], 32 | run: async (client, interaction) => { 33 | const vc = interaction.member.voice.channel 34 | 35 | const args = interaction.options.data 36 | const choice = args[0]?.value 37 | 38 | if(!vc) return interaction.followUp({content:'Must be in VC to use command'}) 39 | 40 | let queue = client.player.getQueue(interaction.guild.id); 41 | if(!queue) return interaction.followUp({content:`No Songs Playing in ${vc}`}) 42 | 43 | queue.setRepeatMode(Number(choice)) 44 | 45 | if(choice == 0){ 46 | interaction.followUp({content:`Repeat Mode set to off`}) 47 | } 48 | else if(choice == 1){ 49 | interaction.followUp({content:`Repeat Mode set to Song`}) 50 | } 51 | else if(choice == 2){ 52 | interaction.followUp({content:`Repeat Mode set to Queue`}) 53 | 54 | } 55 | 56 | 57 | } 58 | } -------------------------------------------------------------------------------- /slashcmd/music/playcontext.js: -------------------------------------------------------------------------------- 1 | const {Client, CommandInteraction, ContextMenuInteraction} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'playcontext', 5 | type:'MESSAGE', 6 | 7 | /** 8 | * 9 | * 10 | * 11 | * 12 | * @param {Client} client 13 | * @param {ContextMenuInteraction} interaction 14 | * 15 | * 16 | */ 17 | 18 | 19 | run: async (client, interaction) => { 20 | 21 | 22 | try{ 23 | 24 | const msg = await interaction.channel.messages.fetch(interaction.targetId); 25 | 26 | const vc = interaction.member.voice.channel 27 | 28 | if(!vc) return interaction.followUp({content:'Must be in VC to play command'}) 29 | 30 | 31 | 32 | let queue = client.player.createQueue(interaction.guild.id, { 33 | data: interaction}); 34 | await queue.join(vc) 35 | 36 | 37 | const query = String(msg); 38 | 39 | 40 | 41 | if(query.includes('https://open.spotify.com/playlist/') || query.includes('https://www.youtube.com/playlist') || query.includes("https://open.spotify.com/album")){ 42 | let song = await queue.playlist(query).catch(_ => { 43 | if(!queue) 44 | queue.stop(); 45 | }); 46 | interaction.followUp({content:'Queueing your songs......'}) 47 | } else { 48 | let song = await queue.play(query).catch(_ => { 49 | data: { custom: 'fields' } 50 | if(!queue) 51 | queue.stop(); 52 | }); 53 | interaction.followUp({content:'Queueing your songs......'}) 54 | 55 | 56 | } 57 | }catch(err){ 58 | interaction.channel.send('An Error Has Occured') 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /slashcmd/utility/twitchinfo.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | name:'twitchinfo', 6 | description: 'Gets information about a Twitch streamer', 7 | options:[ 8 | { 9 | name:'streamer', 10 | description:'The name of the streamer', 11 | type:'STRING', 12 | required:true 13 | } 14 | ], 15 | 16 | run: async(client, interaction) => { 17 | 18 | const streamer = interaction.options.getString('streamer'); 19 | console.log(streamer); 20 | 21 | try{ 22 | 23 | const { data: info } = await axios.get(`https://luminabot.xyz/api/json/twitch-info?username=${streamer}`); 24 | 25 | if(!info){ 26 | return interaction.followUp({content:'Streamer not found'}) 27 | } 28 | 29 | const embed = new Discord.MessageEmbed() 30 | .setTitle(`${info.displayname}'s Twitch Info`) 31 | .addField('Total Follower Count', info.followers) 32 | .addField('Total Views Count'. info.view) 33 | .addField('Created At', info.created_on) 34 | .addField('Currently Live', info.currently_live) 35 | .addField('Last Played Game', info.stream.lastest_game) 36 | .addField('Last Date Live', info.last_live) 37 | .setThumbnail(info.thumbnail) 38 | interaction.followUp({embeds:[embed]}) 39 | 40 | 41 | } 42 | catch(e){ 43 | console.log(e); 44 | interaction.followUp({content:'Streamer channel does not exist or API is down currently'}) 45 | } 46 | 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /slashcmd/utility/pictotext.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const { createWorker } = require("tesseract.js") 3 | 4 | 5 | module.exports = { 6 | 7 | name: 'pictotext', 8 | description: 'Converts image to text', 9 | options: [ 10 | 11 | 12 | { 13 | name: 'image', 14 | description: 'The image to convert to text', 15 | type: 'ATTACHMENT', 16 | required: true 17 | } 18 | ], 19 | 20 | run: async (client, interaction) => { 21 | 22 | 23 | const image = interaction.options.getAttachment('image') 24 | 25 | 26 | try { 27 | const worker = createWorker() 28 | 29 | await worker.load().catch((err) => { 30 | console.log(err) 31 | }) 32 | await worker.loadLanguage("eng").catch((err) => { 33 | console.log(err) 34 | }) 35 | await worker.initialize("eng").catch((err) => { 36 | console.log(err) 37 | }) 38 | const { 39 | data: { text }, 40 | } = await worker.recognize(image.url).catch((err) => { 41 | console.log(err) 42 | }) 43 | await worker.terminate().catch((err) => { 44 | console.log(err) 45 | }) 46 | 47 | await interaction 48 | .followUp({ 49 | content: `${text}`, 50 | }) 51 | .catch((err) => { 52 | console.log(err) 53 | }) 54 | } catch (err) { 55 | console.log(err) 56 | } 57 | 58 | 59 | } 60 | 61 | 62 | 63 | 64 | 65 | } -------------------------------------------------------------------------------- /commands/gameinfo/genshintalents.js: -------------------------------------------------------------------------------- 1 | const genshin = require('genshin-db'); 2 | const Discord = require('discord.js'); 3 | const reactionMenu = require("discordv13-pagination") 4 | 5 | 6 | module.exports = { 7 | name:'genshintalents', 8 | description:'Returns Talents of a specific Genshin character', 9 | 10 | async execute(message,args,client){ 11 | const input = args.join(" ") 12 | const char = genshin.talents(input) 13 | const char2 = genshin.characters(input) 14 | 15 | 16 | 17 | 18 | try{ 19 | const embed = new Discord.MessageEmbed() 20 | .setTitle(`${char.name}'s Talents'`) 21 | .setThumbnail(char2.images.image) 22 | .setColor("RANDOM") 23 | .addFields( 24 | {name:char.combat1.name, value:char.combat1.info, inline:true}, 25 | {name:`${char.combat2.name}:`, value:char.combat2.info, inline:true}, 26 | {name:char.combat3.name, value:char.combat3.info, inline:true}, 27 | ) 28 | 29 | const embed2 = new Discord.MessageEmbed() 30 | .setTitle(`${char.name}'s Talents - Passive'`) 31 | .setThumbnail(char2.images.image) 32 | .setColor("RANDOM") 33 | .addFields( 34 | {name:char.passive1.name, value:char.passive1.info, inline:true}, 35 | {name:char.passive2.name, value:char.passive2.info, inline:true}, 36 | {name:char.passive3.name, value:char.passive3.info, inline:true}, 37 | 38 | 39 | 40 | ) 41 | .setTimestamp() 42 | .setFooter({text:message.author.tag, iconURL:message.author.displayAvatarURL({dynamic: true})}) 43 | 44 | 45 | reactionMenu(message,[embed, embed2]) 46 | 47 | } catch(err){ 48 | message.channel.send("Character not in database") 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /commands/owner/eval.js: -------------------------------------------------------------------------------- 1 | const { Client, Message, MessageEmbed } = require('discord.js'); 2 | const Discord = require("discord.js"); 3 | require("dotenv").config(); 4 | const ownerid = process.env.ownerid; 5 | module.exports = { 6 | name: 'eval', 7 | description: 'Eval Command', 8 | async execute(message, args,client){ 9 | if(message.author.id != ownerid){ 10 | 11 | message.channel.send(`Owner Only Command`) 12 | } 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Evaluating...') 16 | const msg = await message.channel.send({embeds: [embed]}); 17 | try { 18 | const data = eval(args.join(' ').replace(/```/g, '')); 19 | const embed = new MessageEmbed() 20 | .setTitle('Output: ') 21 | .setDescription(await data) 22 | await msg.edit(embed) 23 | await msg.react('✅') 24 | await msg.react('❌') 25 | const filter = (reaction, user) => (reaction.emoji.name === '❌' || reaction.emoji.name === '✅') && (user.id === message.author.id); 26 | msg.awaitReactions(filter, { max: 1 }) 27 | .then((collected) => { 28 | collected.map((emoji) => { 29 | switch (emoji._emoji.name) { 30 | case '✅': 31 | msg.reactions.removeAll(); 32 | break; 33 | case '❌': 34 | msg.delete() 35 | break; 36 | } 37 | }) 38 | }) 39 | } catch (e) { 40 | const embed = new MessageEmbed() 41 | .setTitle('An Error has occured') 42 | return await msg.edit(embed); 43 | 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /classes/emojis.json: -------------------------------------------------------------------------------- 1 | { 2 | "signs": { 3 | "success": "", 4 | "fail": "<:failed:797785009406476288>", 5 | "info": "<:Information:859675243454660628>", 6 | "color": ":art:", 7 | "ping": "<:Ping:804131592062632008>", 8 | "servers": "<:Servers:804133920324452392>", 9 | "users": "<:Users:804135471269412884>", 10 | "bot": "<:Bot:804127527248855060>", 11 | "plus": "<:Plus:860781076519714836>", 12 | "channel": "<:Channel:826292829588291625>", 13 | "members": "<:Members:826293236393181184>", 14 | "online": "", 15 | "dnd": "", 16 | "idle": "", 17 | "offline": "", 18 | "reload": "<:HurricanoReload:837568492101828608>", 19 | "world": "<:HurricanoWorld:837569079346200614>", 20 | "key": "<:HurricanoKey:837569123861004288>", 21 | "topgg": "<:TopGG:860781808920166430>", 22 | "database": "<:Database:860782779896692752>" 23 | }, 24 | "categories": { 25 | "config": "<:Config:859675238873694258>", 26 | "economy": "<:Economy:859675245980024832>", 27 | "fun": "<:Fun:859675245828243506>", 28 | "giveaways": "<:Giveaways:859675246801453056>", 29 | "image": "<:Image:859675240460189737>", 30 | "information": "<:Information:859675243454660628>", 31 | "levelling": "<:Levelling:859675244993708033>", 32 | "moderation": "<:Moderation:859675243999395851>", 33 | "music": "<:Music:859675245929037824>", 34 | "owner": "<:Owner:859675244183683072>", 35 | "suggestions": "<:Suggestions:859675239548977152>", 36 | "utility": "<:Utility:859675240064876544>" 37 | } 38 | } -------------------------------------------------------------------------------- /slashcmd/utility/playrecord.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const fs = require('fs'); 3 | 4 | 5 | module.exports = { 6 | name: 'playrecord', 7 | description:'Plays Recording in VC', 8 | options: [ 9 | { 10 | name:'name', 11 | description:'Name of recording', 12 | type:'STRING', 13 | required: true, 14 | } 15 | ], 16 | run:async(client, interaction) => { 17 | const voicechannel = interaction?.member?.voice.channel; 18 | 19 | const name = interaction.options.getString('name'); 20 | 21 | if (!voicechannel) return interaction.followUp(` 22 | ➔ Please join a Voice Channel to start the record and run the command again!\n 23 | ➔ The name of the recording must be specified correctly to identify and run the recording\n 24 | `); 25 | 26 | if (!fs.existsSync(`./recordings-${name}.pcm`)) return interaction.followUp(` 27 | ⚠️ You have not recorded any Audio yet, please run {record\n 28 | 🔇 Make sure you have a working Mic! 29 | `); 30 | 31 | const connection = await interaction?.member?.voice.channel.join(); 32 | const stream = fs.createReadStream(`./recordings-${name}.pcm`); 33 | 34 | const dispatcher = connection?.play(stream, { 35 | type:'converted' 36 | }) 37 | 38 | dispatcher.on('finish', () => { 39 | interaction?.member?.voice?.channel?.leave(); 40 | return interaction.followUp(` 41 | ✅ Finished recording Voice Audio, run play-audio\n 42 | 🚫 Content is only available until the next recording.`); 43 | }) 44 | 45 | 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /commands/administration/nuke.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'nuke', 5 | description: "Nukes a channel", 6 | async execute(message, args,client){ 7 | if (!message.member.permissions.has('ADMINISTRATOR')) 8 | return message.channel.send({content:'Perms Denied'}); 9 | let clearchannel = message.channel || message.channel.mentions.first() 10 | const filter = m => m.author.id === message.author.id 11 | message.channel.send({content:"Are sure you want to nuke this channel? Type: `yes` or `no`. You have 10 seconds to answer"}).then(r => r.delete(10000)) 12 | message.channel.awaitMessages(filter, { 13 | max: 1, 14 | time: 10000 15 | }).then(collected => { 16 | 17 | if (collected.first().content === "no") { 18 | return message.channel.send({content:"Nuke Cancelled"}) 19 | } 20 | if (collected.first().content === "yes") { 21 | 22 | const embed = new Discord.MessageEmbed() 23 | .setColor('RED') 24 | .setTitle('Nuked!') 25 | .setDescription(`Channel has been nuked`) 26 | .setFooter(message.author.username) 27 | .setImage('https://media.discordapp.net/attachments/772390491303575582/819086461739335720/tenor_5.gif?width=560&height=472') 28 | .setTimestamp() 29 | clearchannel.clone().then(clearchannel => clearchannel.send({embeds:[embed]})) 30 | clearchannel.delete() 31 | } 32 | }).catch(err => { 33 | message.channel.send({content:"Ran out of time, process stopped"}) 34 | }) 35 | } 36 | } -------------------------------------------------------------------------------- /commands/administration/warns.js: -------------------------------------------------------------------------------- 1 | const Schema = require('../../schemas/warn') 2 | const {Client, Message, MessageEmbed} = require('discord.js') 3 | 4 | module.exports = { 5 | name:'warns', 6 | description:'Lists a users warnings', 7 | async execute(message, args, client){ 8 | 9 | try{ 10 | if(!message.member.permissions.has('ADMINSTRATOR')) return message.channel.send({content:'Perms denied'}) 11 | 12 | const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 13 | const reason = args.slice(1).join(' '); 14 | if(!user) return message.channel.send({content:'Member not found'}) 15 | 16 | Schema.findOne({guildid: message.guild.id, user: user.user.id}, async(err, data) => { 17 | if(err) return message.channel.send({content:'Something went wrong'}); 18 | 19 | if(data){ 20 | message.channel.send({embeds:[new MessageEmbed() 21 | .setTitle(`${user.user.tag}'s warns`) 22 | .setDescription( 23 | data.content.map( 24 | 25 | (w, i) => 26 | `\`${i+1}\` | Moderator: ${message.guild.members.cache.get(w.moderator).user.tag}\nReason : ${w.reason}` 27 | 28 | ) 29 | ) 30 | .setColor('RANDOM') 31 | 32 | ]}) 33 | } else{ 34 | message.channel.send({content:'User has no data'}) 35 | } 36 | 37 | 38 | 39 | 40 | }); 41 | 42 | }catch(err){ 43 | console.log(err); 44 | message.channel.send("I do not have perms to use this command") 45 | 46 | 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /commands/utility/twinfo.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios') 2 | const Discord = require('discord.js') 3 | 4 | module.exports = { 5 | 6 | name:'twinfo', 7 | description:'Returns twitch stats and information about a streamer', 8 | 9 | 10 | async execute(message, args, client) { 11 | 12 | const user = args.join(" "); 13 | 14 | if(!user) message.channel.send("Please provide a twitch user"); 15 | 16 | try{ 17 | 18 | const data = await axios.get(`https://luminabot.xyz/api/json/twitch-info?username=${user}`) 19 | 20 | const info = data.data; 21 | const embed = new Discord.MessageEmbed() 22 | .setTitle(`Twitch Stats for **${info.displayname}**`) 23 | .addField('Description: ',`${info.description}`, true) 24 | .addField('Latest Game/Content Streamed', `${info.stream.latest_game}`, false) 25 | .addField('Total Number of Followers ', `${info.followers}`, false) 26 | .addField('Total Stream Views', `${info.views}`, false) 27 | .addField('Streamer Type', `${info.broadcaster_type}`, false) 28 | .addField('Account Created At', `${info.created_on}`, false) 29 | .addField('Currently Live', `${info.currently_live}`, false) 30 | .addField('Last Stream Date', `${info.last_live}`, false) 31 | .setImage(info.thumbnail) 32 | .setURL(info.twitch_profile) 33 | 34 | 35 | return message.channel.send({embeds:[embed]}); 36 | 37 | 38 | 39 | 40 | 41 | } catch(err){ 42 | console.log(err); 43 | return message.channel.send('Twitch Profile Does not exist'); 44 | } 45 | } 46 | 47 | 48 | } -------------------------------------------------------------------------------- /slashcmd/serversetup/chatbot.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | const Schema = require("../../schemas/chatbot-channel"); 3 | 4 | module.exports = { 5 | name: "chatbot", 6 | description: "Enable/Disable Chatbot", 7 | permission: "ADMINISTRATOR", 8 | options: [ 9 | { 10 | name: "choice", 11 | description: "Enable/Disable Chatbot System", 12 | type: "STRING", 13 | required: true, 14 | choices: [ 15 | { 16 | name: "enable", 17 | value: "enable", 18 | }, 19 | { 20 | name: "disable", 21 | value: "disable", 22 | }, 23 | ], 24 | }, 25 | ], 26 | 27 | /** 28 | * 29 | * @param {Client} client 30 | * @param {CommandInteraction} interaction 31 | */ 32 | 33 | run: async (client, interaction) => { 34 | let args = interaction.options.data; 35 | let choice = args[0]?.value; 36 | 37 | if (choice.toLowerCase() === "enable") { 38 | Schema.findOne({ Guild: interaction.guild.id }, async (err, data) => { 39 | if (data) { 40 | data.delete(); 41 | } else { 42 | new Schema({ 43 | Guild: interaction.guild.id, 44 | Channel: interaction.channel.id, 45 | }).save(); 46 | interaction.followUp({ content: "✅ ChatBot System Enabled" }); 47 | } 48 | }); 49 | } else if (choice.toLowerCase() === "disable") { 50 | Schema.findOne({ Guild: interaction.guild.id }, async (err, data) => { 51 | if (!data) 52 | interaction.followUp({ content: "ChatBot System was never enabled" }); 53 | data.delete(); 54 | }); 55 | interaction.followUp({ content: "❌ ChatBot System Disabled " }); 56 | } 57 | }, 58 | }; 59 | -------------------------------------------------------------------------------- /slashcmd/utility/avatar.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed, MessageButton, MessageActionRow} = require('discord.js') 2 | 3 | module.exports = { 4 | name:'avatar', 5 | description: 'Avatar Slash Command', 6 | options: [ 7 | 8 | { 9 | 10 | name:'target', 11 | description:'Select whose profile pic you want to see', 12 | type:'USER', 13 | required:true 14 | 15 | 16 | } 17 | ], 18 | /** 19 | * 20 | * @param {Client} client 21 | * @param {CommandInteraction} interaction 22 | */ 23 | run: async (client, interaction) => { 24 | const Target = interaction.options.getUser('target') 25 | 26 | const but = new MessageButton() 27 | .setStyle('LINK') 28 | .setLabel("PNG") 29 | 30 | .setURL( Target.displayAvatarURL({dynamic: true, format: "png", size: 4096}) ) 31 | const but2 = new MessageButton() 32 | .setStyle('LINK') 33 | .setLabel("JPG") 34 | 35 | .setURL( Target.displayAvatarURL({dynamic: true, format: "jpg", size: 4096}) ) 36 | const but3 = new MessageButton() 37 | .setStyle('LINK') 38 | .setLabel("WEBP") 39 | .setURL( Target.displayAvatarURL({dynamic: true, format: "webp", size: 4096 }) ) 40 | 41 | const row = new MessageActionRow().addComponents(but, but2, but3) 42 | 43 | const res = new MessageEmbed() 44 | .setAuthor(`${Target.tag} Avatar`, Target.displayAvatarURL({dynamic:true})) 45 | .setImage(Target.displayAvatarURL({dynamic:true, size:4096})) 46 | .setColor("RANDOM") 47 | .setTimestamp() 48 | 49 | 50 | interaction.followUp({embeds:[res], components: [row]}) 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /slashcmd/utility/google.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | const google = process.env.google 3 | const googleid = process.env.googleid 4 | const superagent = require('superagent') 5 | const { CommandInteraction, Client, MessageEmbed} = require('discord.js') 6 | 7 | module.exports = { 8 | name: 'google', 9 | description:'Searches Google', 10 | options: [ 11 | { 12 | name:'query', 13 | description:'The query to search for', 14 | type:'STRING', 15 | required:true 16 | } 17 | ], 18 | 19 | /** 20 | * 21 | * 22 | * 23 | * 24 | * @param {Client} client 25 | * @param {CommandInteraction} interaction 26 | * 27 | * 28 | */ 29 | run:async (client, interaction) => { 30 | const query = interaction.options.getString('query'); 31 | 32 | 33 | let res = await superagent.get("https://customsearch.googleapis.com/customsearch/v1") 34 | .query({q: query, cx:googleid, key: google}) 35 | 36 | if(!res.body.items) return interaction.followUp({content:"No results found"}) 37 | 38 | if(res.status >= 400) return interaction.followUp({content:"Request 400 Error"}).then(console.log(result.message)) 39 | 40 | let result = res.body.items[0]; 41 | 42 | console.log(result) 43 | const embed = new MessageEmbed() 44 | .setColor(client.color.invis) 45 | .setTitle(String(result.title)) 46 | .setDescription(result.snippet) 47 | .setURL(result.link) 48 | .setImage(result.pagemap.cse_image[0].src || result.pagemap.cse_thumbnail[0].src) 49 | .setFooter(`Powered by Google`) 50 | 51 | interaction.followUp({embeds: [embed]}) 52 | 53 | 54 | } 55 | } -------------------------------------------------------------------------------- /commands/utils/anime.js: -------------------------------------------------------------------------------- 1 | const Media = require("../../schemas/Media"); 2 | const { 3 | MessageEmbed, 4 | } = require('discord.js'); 5 | 6 | /** 7 | * 8 | * @param {string} type ANIME or MANGA 9 | * @param {Media} media 10 | * @param {boolean} extended 11 | */ 12 | function generateMessageEmbed(type, media, extended) { 13 | const fields = []; 14 | if (extended) { 15 | fields.push({ 16 | name: "Mean Score", 17 | value: `${media.meanScore}`, 18 | inline: true, 19 | }); 20 | if (media.episodes) { 21 | fields.push({ 22 | name: "Episodes", 23 | value: `${media.episodes}`, 24 | inline: true, 25 | }); 26 | } 27 | fields.push({ 28 | name: "Status", 29 | value: `${media.status}`, 30 | inline: true, 31 | }); 32 | fields.push({ 33 | name: "Start Date", 34 | value: `${media.startDate}`, 35 | inline: true, 36 | }); 37 | if (!media.endDate.match(/.*null.*/g)) { 38 | fields.push({ 39 | name: "End Date", 40 | value: `${media.endDate}`, 41 | inline: true, 42 | }); 43 | } 44 | } 45 | fields.push({ 46 | name: "Genres", 47 | value: `\`${media.genres}\``, 48 | inline: true, 49 | }); 50 | if (media.isAdult) { 51 | fields.push({ 52 | name: "NSFW", 53 | value: "Yes. ", 54 | inline: true, 55 | }); 56 | } 57 | 58 | let color = 0x0cca4a; 59 | if (media.isAdult) { 60 | color = 0xbf0909; 61 | } 62 | else if (type == "MANGA") { 63 | color = 0x0c4ec9; 64 | } 65 | 66 | const embed = new MessageEmbed() 67 | .setColor(color) 68 | .setTitle(media.title) 69 | .setURL(media.anilistUrl) 70 | .setThumbnail(media.image) 71 | .addFields(fields); 72 | if (extended) { 73 | embed.setDescription(media.description); 74 | } 75 | 76 | return embed; 77 | } 78 | 79 | module.exports = { 80 | generateMessageEmbed, 81 | }; 82 | -------------------------------------------------------------------------------- /commands/administration/anti-invite.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, MessageEmbed} = require('discord.js'); 2 | const schema = require('../../schemas/anti-invite') 3 | 4 | 5 | module.exports = { 6 | name:'anti-invite', 7 | description: 'Sets Anti Invite System for Server', 8 | usage:' anti-invite enable/disable serverid', 9 | 10 | async execute(message, args,client){ 11 | 12 | if(!message.member.permissions.has('ADMINISTRATOR')) return message.channel.send({content:'Perms Denied'}) 13 | if(!message.guild.me.permissions.has('MANAGE_GUILD') || message.guild.me.permissions.has('MANAGE_MESSAGES')) { 14 | return message.channel.send({content:'I must have ADMIN command to run this command'}) 15 | } 16 | const check = args[0] 17 | const id = args[1] 18 | 19 | if(check === 'enable') { 20 | 21 | 22 | schema.findOne({Server: id}, async(err, data) =>{ 23 | if(data) return message.channel.send({content:'Server already has anti-invite on'}) 24 | 25 | new schema({ 26 | Server: id 27 | }).save() 28 | message.channel.send({content:`Anti-Invite has been turned on in ${message.guild.name}`}) 29 | }) 30 | 31 | } 32 | else if(check === 'disable') { 33 | 34 | schema.findOne({Server: id}, async(err, data) =>{ 35 | if(!data) return message.channel.send({content:'Server does not have anti-invite on'}) 36 | 37 | data.delete() 38 | message.channel.send({content:`Anti-Invite has been turned off in ${message.guild.name}`}) 39 | }) 40 | } 41 | else{ 42 | return message.channel.send({content:'Invalid Option, Please use enable or disable'}) 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /slashcmd/administration/unmute.js: -------------------------------------------------------------------------------- 1 | const {CommandInteraction, Client, MessageEmbed} = require('discord.js') 2 | const Schema = require('../../schemas/mute') 3 | module.exports = { 4 | name:'unmute', 5 | description: 'unmutes users', 6 | permission: 'ADMINISTRATOR', 7 | options: [ 8 | 9 | { 10 | 11 | name:'target', 12 | description:'Select who you want to unmute', 13 | type:'USER', 14 | required:true 15 | 16 | 17 | }, 18 | ], 19 | 20 | /** 21 | * 22 | * @param {Client} client 23 | * @param {CommandInteracion} interaction 24 | */ 25 | 26 | 27 | 28 | 29 | run: async (client, interaction) => { 30 | const Target = interaction.options.getMember('target') 31 | if(!Target) return interaction.followUp({content:'Member is not found.'}) 32 | const role = interaction.guild.roles.cache.find(r => r.name.toLowerCase() === 'muted'); 33 | 34 | 35 | Schema.findOne({ 36 | Guild:interaction.guild.id 37 | }, 38 | 39 | async(err, data) => { 40 | if(!data) return interaction.followUp({content:"Member was not muted"}) 41 | 42 | const user = data.Users.findIndex((prop) => prop === Target.id) 43 | 44 | if(user == -1 ) return interaction.followUp({content:"Member is not muted"}) 45 | 46 | data.Users.splice(user,1); 47 | 48 | data.save() 49 | await Target.roles.remove(role) 50 | 51 | interaction.followUp({content:`${Target.displayName} has been unmuted`}) 52 | }) 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /commands/gameinfo/genshinchar.js: -------------------------------------------------------------------------------- 1 | const genshin = require('genshin-db'); 2 | const Discord = require('discord.js'); 3 | 4 | module.exports = { 5 | 6 | name:"genshinchar", 7 | description:"Returns Genshin Characters", 8 | 9 | async execute(message,args,client){ 10 | 11 | const input = args.join(" ") 12 | 13 | const char = genshin.characters(input) 14 | 15 | 16 | 17 | try{ 18 | 19 | const embed = new Discord.MessageEmbed() 20 | .setTitle(`**${char.name}**`) 21 | .setThumbnail(char.images.cover1) 22 | .setColor("RANDOM") 23 | .addFields( 24 | {name:"Titles:", value:String(char.title),inline:false}, 25 | {name:"Element:", value:String(char.elementText),inline:false}, 26 | {name:"Weapon Type:", value:String(char.weaponText),inline:false}, 27 | {name:"Gender:", value:String(char.gender),inline:false}, 28 | {name:"Region:", value:String(char.region),inline:false}, 29 | {name:"Rarity:", value:String(char.rarity),inline:false}, 30 | {name:"Birthday:", value:String(char.birthday),inline:false}, 31 | {name:"Constellation:", value:String(char.constellation),inline:false}, 32 | {name:"Substat:", value:String(char.substatText),inline:false}, 33 | {name:"Affiliation:", value:String(char.affiliation),inline:false}, 34 | {name:"Description:", value:String(char.description),inline:true}, 35 | 36 | ) 37 | 38 | .setTimestamp() 39 | .setFooter({text:message.author.tag, iconURL:message.author.displayAvatarURL({dynamic: true})}) 40 | 41 | 42 | 43 | 44 | return message.channel.send({embeds:[embed]}) 45 | 46 | } catch(err){ 47 | console.log(err) 48 | message.channel.send("Character not in database") 49 | } 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /commands/gameinfo/genshinconst.js: -------------------------------------------------------------------------------- 1 | const genshin = require('genshin-db'); 2 | const Discord = require('discord.js'); 3 | const reactionMenu = require("discordv13-pagination") 4 | 5 | 6 | module.exports = { 7 | name:'genshinconst', 8 | description:'Returns the constellation of a character', 9 | 10 | async execute(message, args,client){ 11 | 12 | const input = args.join(" ") 13 | const char = genshin.constellations(input) 14 | const char2 = genshin.characters(input) 15 | 16 | 17 | 18 | 19 | try{ 20 | 21 | 22 | const embed = new Discord.MessageEmbed() 23 | .setTitle(`${char.name}'s Constellations`) 24 | .setThumbnail(char2.images.image) 25 | .setColor("RANDOM") 26 | .addFields( 27 | {name:`Constellation 1: ${char.c1.name}`, value:char.c1.effect, inline:true}, 28 | {name:`Constellation 2: ${char.c2.name}`, value:char.c2.effect, inline:false}, 29 | {name:`Constellation 3: ${char.c3.name}`, value:char.c3.effect, inline:false}, 30 | ) 31 | 32 | const embed2 = new Discord.MessageEmbed() 33 | 34 | .setTitle(`${char.name}'s Constellations(4-6)`) 35 | .setThumbnail(char2.images.image) 36 | .setColor("RANDOM") 37 | .addFields( 38 | {name:`Constellation 4: ${char.c4.name}`, value:char.c4.effect, inline:true}, 39 | {name:`Constellation 5: ${char.c5.name}`, value:char.c5.effect, inline:false}, 40 | {name:`Constellation 6: ${char.c6.name}`, value:char.c6.effect, inline:false}, 41 | ) 42 | 43 | .setTimestamp() 44 | .setFooter({text:message.author.tag, iconURL:message.author.displayAvatarURL({dynamic: true})}) 45 | 46 | 47 | reactionMenu(message,[embed, embed2]) 48 | 49 | } catch(err){ 50 | message.channel.send("Character not in database") 51 | } 52 | 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /commands/utility/wikipedia.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch'); 2 | const Discord = require('discord.js'); 3 | 4 | module.exports = { 5 | name: 'wiki', 6 | description: 'Search for wikipedia', 7 | 8 | async execute(message,args,client){ 9 | const wiki = args.slice().join(' ') 10 | 11 | if(!wiki) return message.channel.send('Provide query to search') 12 | 13 | const url = `https://en.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(wiki)}` 14 | 15 | let response 16 | 17 | try{ 18 | response = await fetch(url).then(res => res.json()) 19 | } 20 | catch(e){ 21 | return message.channel.send('An error occurred') 22 | } 23 | 24 | 25 | try{ 26 | if(response.type === 'disambiguation'){ 27 | const embed = new Discord.MessageEmbed() 28 | .setColor('RANDOM') 29 | .setTitle(response.title) 30 | .setURL(response.content_urls.desktop.page) 31 | .setDescription([`${response.extract} Links for Topic You Searched [Link](${response.content_urls.desktop.page})`]) 32 | return message.channel.send({embeds:[embed]}); 33 | } else{ 34 | const embed = new Discord.MessageEmbed() 35 | .setColor('RANDOM') 36 | .setTitle(response.title) 37 | .setThumbnail(response.thumbnail.source) 38 | .setURL(response.content_urls.desktop.page) 39 | .setDescription(response.extract) 40 | return message.channel.send({embeds:[embed]}); 41 | 42 | } 43 | } 44 | catch{ 45 | return message.channel.send('Provide a valid query to search') 46 | } 47 | 48 | 49 | } 50 | 51 | } -------------------------------------------------------------------------------- /commands/utility/steal-emoji.js: -------------------------------------------------------------------------------- 1 | const {Client, Message, Util, MessageEmbed} = require('discord.js'); 2 | 3 | module.exports = { 4 | name:'steal-emoji', 5 | description:'Steals Emojis(Nitro Required to Steal)', 6 | 7 | async execute(message,args,client){ 8 | 9 | if(!args.length){ 10 | return message.channel.send("Please specify some emoji to steal"); 11 | } 12 | 13 | if(!message.guild.me.permissions.has('MANAGE_EMOJIS')) return message.channel.send('Invalid Bot Perms') 14 | 15 | if(!message.member.permissions.has('MANAGE_EMOJIS')) return message.channel.send('Invalid User Perms') 16 | 17 | const name = args[1] ? args[1].replace(/[^a-z0-9]/gi, "") : null; 18 | if (!name) { 19 | return message.channel.send("Please provide an emoji name to set "); 20 | } 21 | if (name.length < 2 || name > 32) { 22 | return message.channel.send("Emoji name length must be between 2 and 32 characters"); 23 | } 24 | 25 | for(const rawEmoji of args){ 26 | console.log(rawEmoji); 27 | const parsedEmoji = Util.parseEmoji(rawEmoji); 28 | 29 | 30 | 31 | if(parsedEmoji.id){ 32 | const extension = parsedEmoji.animated ? ".gif" : ".png"; 33 | const url = `https://cdn.discordapp.com/emojis/${parsedEmoji.id + extension}`; 34 | message.guild.emojis.create(url, name) 35 | .then((emoji) => 36 | 37 | { 38 | 39 | const embed = new MessageEmbed() 40 | .setTitle('Emoji Added') 41 | .setTitle('Emoji Added') 42 | .setDescription(`Emoji **${name.toUpperCase()}** was added`) 43 | .setThumbnail(emoji.url) 44 | .setTimestamp() 45 | .setColor('RANDOM') 46 | message.channel.send({embeds:[embed]}) 47 | }) 48 | } 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /slashcmd/utility/status.js: -------------------------------------------------------------------------------- 1 | const { CommandInteraction, Client, MessageEmbed } = require("discord.js"); 2 | const { connection } = require("mongoose"); 3 | 4 | module.exports = { 5 | name: "status", 6 | description: "Displays the status of the bot and Database connection", 7 | /** 8 | * @param {CommandInteraction} interaction 9 | * @param {Client} client 10 | */ 11 | 12 | run: async (client, interaction) => { 13 | 14 | let totalSeconds = (client.uptime / 1000); 15 | let days = Math.floor(totalSeconds / 86400); 16 | totalSeconds %= 86400; 17 | let hours = Math.floor(totalSeconds / 3600); 18 | totalSeconds %= 3600; 19 | let minutes = Math.floor(totalSeconds / 60); 20 | let seconds = Math.floor(totalSeconds % 60); 21 | 22 | 23 | 24 | 25 | 26 | const Response = new MessageEmbed() 27 | .setColor("BLURPLE") 28 | .setDescription( 29 | ` **Bot Status** 30 | \n **Client**: \`🟢 Online!\` 31 | \n **Database**: \`${switchTo(connection.readyState)}\` 32 | \n **Client Ping**: \`${client.ws.ping}ms\` 33 | \n **Message Ping**: \` ${Date.now() - interaction.createdTimestamp}ms \` 34 | \n **Uptime**: ${days} Days ${hours} Hours ${minutes} Minutes ${seconds} Seconds`) 35 | 36 | interaction.followUp({ embeds: [Response]}); 37 | } 38 | 39 | 40 | 41 | 42 | 43 | 44 | } 45 | 46 | function switchTo(val) { 47 | var status = " "; 48 | switch(val) { 49 | case 0 : status = `🔴 Disconnected!` 50 | break; 51 | case 1 : status = `🟢 Connceted!` 52 | break; 53 | case 2 : status = `🟠 Connecting!` 54 | break; 55 | case 3 : status = `🟠 Disconnecting!` 56 | break; 57 | } 58 | return status; 59 | } -------------------------------------------------------------------------------- /schemas/giveaway.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const giveawaySchema = new mongoose.Schema({ 3 | messageId: String, 4 | channelId: String, 5 | guildId: String, 6 | startAt: Number, 7 | endAt: Number, 8 | ended: Boolean, 9 | winnerCount: Number, 10 | prize: String, 11 | messages: { 12 | giveaway: String, 13 | giveawayEnded: String, 14 | inviteToParticipate: String, 15 | drawing: String, 16 | dropMessage: String, 17 | winMessage: mongoose.Mixed, 18 | embedFooter: mongoose.Mixed, 19 | noWinner: String, 20 | winners: String, 21 | endedAt: String, 22 | hostedBy: String 23 | }, 24 | thumbnail: String, 25 | image: String, 26 | hostedBy: String, 27 | winnerIds: { type: [String], default: undefined }, 28 | reaction: mongoose.Mixed, 29 | botsCanWin: Boolean, 30 | embedColor: mongoose.Mixed, 31 | embedColorEnd: mongoose.Mixed, 32 | exemptPermissions: { type: [], default: undefined }, 33 | exemptMembers: String, 34 | bonusEntries: String, 35 | extraData: mongoose.Mixed, 36 | lastChance: { 37 | enabled: Boolean, 38 | content: String, 39 | threshold: Number, 40 | embedColor: mongoose.Mixed 41 | }, 42 | pauseOptions: { 43 | isPaused: Boolean, 44 | content: String, 45 | unPauseAfter: Number, 46 | embedColor: mongoose.Mixed, 47 | durationAfterPause: Number, 48 | infiniteDurationText: String 49 | }, 50 | isDrop: Boolean, 51 | allowedMentions: { 52 | parse: { type: [String], default: undefined }, 53 | users: { type: [String], default: undefined }, 54 | roles: { type: [String], default: undefined } 55 | } 56 | }, { id: false }); 57 | 58 | module.exports = mongoose.model('giveaway', giveawaySchema); -------------------------------------------------------------------------------- /commands/utility/twitter.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | const request = require('node-superfetch'); 3 | require('dotenv').config(); 4 | let bearer = process.env.twitter; 5 | let {stripIndents} = require('common-tags'); 6 | 7 | module.exports = { 8 | name:'twitter', 9 | description:'returns twitter profile', 10 | 11 | async execute(message,args,client){ 12 | let username = args[0] 13 | if(!username){ 14 | return message.channel.send("Please provide a username") 15 | } 16 | try{ 17 | const {body} = await request.get("https://api.twitter.com/1.1/users/show.json") 18 | .set({Authorization:`Bearer ${bearer}`}).query({screen_name: username}) 19 | 20 | const embed = new Discord.MessageEmbed() 21 | .setAuthor(`@${body.screen_name.toLowerCase()}`, body.verified ? "https://emoji.gg/assets/emoji/6817_Discord_Verified.png": null) 22 | .setDescription(body.description) 23 | .setFooter(`Twitter User ID: ${body.id}`, "https://abs.twimg.com/favicons/twitter.ico") 24 | .addField("Counts", stripIndents` 25 | -**Followers:** ${(body.followers_count).toLocaleString()} 26 | -**Following:**${(body.friends_count).toLocaleString()} 27 | -**Tweets**${(body.statuses_count).toLocaleString()} 28 | `, true) 29 | .addField("Created Since:", body.created_at, true) 30 | .setThumbnail(body.profile_image_url_https.replace('_normal', '')) 31 | .setImage(body.profile_banner_url) 32 | 33 | return message.channel.send({embeds:[embed]}); 34 | 35 | } catch(error){ 36 | if(error.status === 403) return message.channel.send("This user has either made their account private or closed it") 37 | else if(error.status == 404) return message.channel.send("This user does not exist") 38 | else return message.channel.send(`Unknown error: ${error.message}`) 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /commands/utility/documention.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios') 2 | const Docs = require('discord.js-docs') 3 | module.exports = { 4 | 5 | name:'docs', 6 | description: 'Returns Discord Documentation', 7 | 8 | async execute(message,args){ 9 | 10 | 11 | const query = args.join(' ') 12 | 13 | const doc = await Docs.fetch('stable') 14 | const results = await doc.resolveEmbed(query) 15 | 16 | 17 | if(!results){ 18 | return message.channel.send('Could not find in documentation') 19 | } 20 | 21 | const string = makeBetterUrl(JSON.stringify(results)) 22 | 23 | const embed = JSON.parse(string) 24 | 25 | embed.author.url = `https://discord.js.org/#/docs/discord.js/stable/general/welcome` 26 | 27 | 28 | const extra = 29 | '\n\nView more here: ' + 30 | /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/ 31 | .exec(embed.description)[0] 32 | .split(')')[0] 33 | 34 | 35 | for(const field of embed.fields || []){ 36 | if(field.value.length >= 1024){ 37 | field.value = field.value.slice(0,1024) 38 | const split = field.value.split(' ') 39 | let joined = split.join(' ') 40 | 41 | while(joined.length >= 1024 - extra.length){ 42 | split.pop() 43 | joined = split.join(' ') 44 | } 45 | field.value = joined + extra 46 | } 47 | 48 | } 49 | 50 | 51 | if(embed.fields && embed.fields[embed.fields.length-1].value.startsWith('[View Source')){ 52 | embed.fields.pop() 53 | } 54 | 55 | return message.channel.send({embeds:[embed]}) 56 | } 57 | 58 | 59 | } 60 | 61 | const makeBetterUrl = (string) => { 62 | string.replace(/docs\/docs\/disco/g, `docs/discord.js/stable`) 63 | .replace(/\(disco\)/g, '') 64 | 65 | return string 66 | } 67 | --------------------------------------------------------------------------------