nyx

The first CODM discrod bot -- cath.exe Template
git clone https://codeberg.org/night0721/nyx
Log | Files | Refs | LICENSE

commit 3e7418615811ad33703635e873f5f723969069ce
parent 4491b1b9f5af8afe30d9f04d617932d86fb671a0
Author: night0721 <[email protected]>
Date:   Sat, 30 Jul 2022 15:54:39 +0100

this commit cost my computer to lag as dumb...

Diffstat:
Dclient/GiveawaysClient.js | 38--------------------------------------
Mclient/NYX.js | 133++++++++++++++++++++++++++++++++++++++++---------------------------------------
Dclient/StarboardClient.js | 6------
Dcommand/Fun/ascii.js | 23-----------------------
Dcommand/Fun/dare.js | 21---------------------
Dcommand/Fun/hangman.js | 97-------------------------------------------------------------------------------
Dcommand/Fun/say.js | 20--------------------
Dcommand/Fun/ship.js | 42------------------------------------------
Dcommand/Fun/simprate.js | 33---------------------------------
Dcommand/Fun/truth.js | 21---------------------
Dcommand/Fun/wyr.js | 31-------------------------------
Dcommand/Moderation/warn.js | 273-------------------------------------------------------------------------------
Ddata/APEX/legends.json | 25-------------------------
Ddraw.js | 82-------------------------------------------------------------------------------
Devents/afk.js | 25-------------------------
Mevents/interactionCreate.js | 6+++---
Devents/raw.js | 2--
Devents/starboard.js | 8--------
Devents/voiceStateUpdate.js | 63---------------------------------------------------------------
Mstart.bat | 6++++--
Rclient/CodeClient.js -> unused/client/CodeClient.js | 0
Aunused/client/GiveawaysClient.js | 38++++++++++++++++++++++++++++++++++++++
Aunused/client/StarboardClient.js | 6++++++
Rclient/URLClient.js -> unused/client/URLClient.js | 0
Rutil/dist/cmds.js -> unused/cmds.js | 0
Dunused/commands/Config/panel.js | 28----------------------------
Dunused/commands/Config/rr-add.js | 46----------------------------------------------
Dunused/commands/Config/rr-rmv.js | 34----------------------------------
Rcommand/Economy/bal.js -> unused/commands/Economy/bal.js | 0
Rcommand/Economy/bet.js -> unused/commands/Economy/bet.js | 0
Rcommand/Economy/blackjack.js -> unused/commands/Economy/blackjack.js | 0
Rcommand/Economy/buy.js -> unused/commands/Economy/buy.js | 0
Rcommand/Economy/daily.js -> unused/commands/Economy/daily.js | 0
Rcommand/Economy/gift.js -> unused/commands/Economy/gift.js | 0
Rcommand/Economy/give.js -> unused/commands/Economy/give.js | 0
Rcommand/Economy/gun.js -> unused/commands/Economy/gun.js | 0
Rcommand/Economy/inv.js -> unused/commands/Economy/inv.js | 0
Rcommand/Economy/multiplier.js -> unused/commands/Economy/multiplier.js | 0
Rcommand/Economy/profile.js -> unused/commands/Economy/profile.js | 0
Rcommand/Economy/rich.js -> unused/commands/Economy/rich.js | 0
Rcommand/Economy/shop.js -> unused/commands/Economy/shop.js | 0
Rcommand/Economy/slots.js -> unused/commands/Economy/slots.js | 0
Rcommand/Economy/steal.js -> unused/commands/Economy/steal.js | 0
Rcommand/Economy/work.js -> unused/commands/Economy/work.js | 0
Dunused/commands/Fun/busted.js | 27---------------------------
Dunused/commands/Fun/choose.js | 73-------------------------------------------------------------------------
Dunused/commands/Fun/coinflip.js | 17-----------------
Dunused/commands/Fun/connect4.js | 321-------------------------------------------------------------------------------
Dunused/commands/Fun/dino.js | 98-------------------------------------------------------------------------------
Dunused/commands/Fun/dog.js | 28----------------------------
Dunused/commands/Fun/drop.js | 50--------------------------------------------------
Dunused/commands/Fun/ds.js | 24------------------------
Dunused/commands/Fun/fun.js | 130-------------------------------------------------------------------------------
Dunused/commands/Fun/hack.js | 138-------------------------------------------------------------------------------
Dunused/commands/Fun/hug.js | 43-------------------------------------------
Dunused/commands/Fun/image.js | 63---------------------------------------------------------------
Dunused/commands/Fun/kiss.js | 43-------------------------------------------
Dunused/commands/Fun/messageinfo.js | 41-----------------------------------------
Dunused/commands/Fun/obama.js | 45---------------------------------------------
Dunused/commands/Fun/quote.js | 42------------------------------------------
Dunused/commands/Fun/roleinfo.js | 85-------------------------------------------------------------------------------
Dunused/commands/Fun/rps.js | 223-------------------------------------------------------------------------------
Dunused/commands/Fun/sr.js | 29-----------------------------
Dunused/commands/Fun/topic.js | 18------------------
Dunused/commands/Fun/topics.json | 32--------------------------------
Dunused/commands/Fun/triggered.js | 25-------------------------
Dunused/commands/Giveaway/giveaway.js | 144-------------------------------------------------------------------------------
Dunused/commands/Information/banner.js | 52----------------------------------------------------
Dunused/commands/Information/servericon.js | 17-----------------
Dunused/commands/Information/serverinfo.js | 185-------------------------------------------------------------------------------
Dunused/commands/Moderation/announce.js | 63---------------------------------------------------------------
Rcommand/Moderation/ban.js -> unused/commands/Moderation/ban.js | 0
Rcommand/Moderation/kick.js -> unused/commands/Moderation/kick.js | 0
Rcommand/Moderation/lock.js -> unused/commands/Moderation/lock.js | 0
Rcommand/Moderation/mute.js -> unused/commands/Moderation/mute.js | 0
Rcommand/Moderation/nuke.js -> unused/commands/Moderation/nuke.js | 0
Dunused/commands/Moderation/permission.js | 120-------------------------------------------------------------------------------
Rcommand/Moderation/purge.js -> unused/commands/Moderation/purge.js | 0
Rcommand/Moderation/role.js -> unused/commands/Moderation/role.js | 0
Rcommand/Moderation/slowmode.js -> unused/commands/Moderation/slowmode.js | 0
Rcommand/Moderation/unban.js -> unused/commands/Moderation/unban.js | 0
Rcommand/Moderation/unmute.js -> unused/commands/Moderation/unmute.js | 0
Aunused/commands/Moderation/warn.js | 273+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rcommand/Music/bassboost.js -> unused/commands/Music/bassboost.js | 0
Rcommand/Music/clearqueue.js -> unused/commands/Music/clearqueue.js | 0
Rcommand/Music/disconnect.js -> unused/commands/Music/disconnect.js | 0
Rcommand/Music/grab.js -> unused/commands/Music/grab.js | 0
Rcommand/Music/loop.js -> unused/commands/Music/loop.js | 0
Rcommand/Music/move.js -> unused/commands/Music/move.js | 0
Rcommand/Music/nowplaying.js -> unused/commands/Music/nowplaying.js | 0
Rcommand/Music/pause.js -> unused/commands/Music/pause.js | 0
Rcommand/Music/play.js -> unused/commands/Music/play.js | 0
Rcommand/Music/queue.js -> unused/commands/Music/queue.js | 0
Rcommand/Music/remove.js -> unused/commands/Music/remove.js | 0
Rcommand/Music/resume.js -> unused/commands/Music/resume.js | 0
Rcommand/Music/seek.js -> unused/commands/Music/seek.js | 0
Rcommand/Music/shuffle.js -> unused/commands/Music/shuffle.js | 0
Rcommand/Music/skip.js -> unused/commands/Music/skip.js | 0
Rcommand/Music/volume.js -> unused/commands/Music/volume.js | 0
Dunused/commands/Owner/encrypt.js | 39---------------------------------------
Rcommand/Owner/add.js -> unused/commands/Utilities/add.js | 0
Rcommand/Utilities/afk.js -> unused/commands/Utilities/afk.js | 0
Munused/commands/Utilities/codebin.js | 2+-
Dunused/commands/Utilities/docs.js | 27---------------------------
Aunused/commands/Utilities/draw.js | 82+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rcommand/Utilities/emoji.js -> unused/commands/Utilities/emoji.js | 0
Rcommand/Utilities/emojiadd.js -> unused/commands/Utilities/emojiadd.js | 0
Rcommand/Utilities/esnipe.js -> unused/commands/Utilities/esnipe.js | 0
Dunused/commands/Utilities/github.js | 61-------------------------------------------------------------
Aunused/commands/Utilities/giveaway.js | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dunused/commands/Utilities/hexcolor.js | 54------------------------------------------------------
Dunused/commands/Utilities/lb.js | 34----------------------------------
Rcommand/Utilities/lyrics.js -> unused/commands/Utilities/lyrics.js | 0
Rcommand/Utilities/nsfw.js -> unused/commands/Utilities/nsfw.js | 0
Dunused/commands/Utilities/poll.js | 38--------------------------------------
Dunused/commands/Utilities/rank.js | 303-------------------------------------------------------------------------------
Munused/commands/Utilities/shorturl.js | 2+-
Rcommand/Utilities/snipe.js -> unused/commands/Utilities/snipe.js | 0
Dunused/commands/Utilities/timer.js | 77-----------------------------------------------------------------------------
Rutil/dist/err.js -> unused/err.js | 0
Aunused/events/afk.js | 25+++++++++++++++++++++++++
Dunused/events/messageCreate.js | 243-------------------------------------------------------------------------------
Revents/messageDelete.js -> unused/events/messageDelete.js | 0
Dunused/events/messageReaction.js | 30------------------------------
Revents/messageUpdate.js -> unused/events/messageUpdate.js | 0
Aunused/events/raw.js | 2++
Aunused/events/starboard.js | 8++++++++
Aunused/events/voiceStateUpdate.js | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dunused/models/reaction.js | 10----------
Rdata/APEX/apex.json -> util/Data/APEX/apex.json | 0
Autil/Data/APEX/legends.json | 25+++++++++++++++++++++++++
Rdata/CODM/loadout.js -> util/Data/CODM/loadout.js | 0
Rdata/CODM/new-stats.js -> util/Data/CODM/new-stats.js | 0
Rdata/CODM/stats.js -> util/Data/CODM/stats.js | 0
Dutil/assets/fonts/Poppins-Regular.ttf | 0
Dutil/assets/fonts/Poppins-SemiBold.ttf | 0
Mutil/dist/handler.js | 21---------------------
137 files changed, 742 insertions(+), 4104 deletions(-)

diff --git a/client/GiveawaysClient.js b/client/GiveawaysClient.js @@ -1,38 +0,0 @@ -const { GiveawaysClient } = require("cath"); -const client = require(".."); -require("dotenv").config(); -module.exports = new GiveawaysClient({ - client, - MongooseConnectionURI: process.env.MONGO, - GiveawayMessages: { - dmWinner: true, - giveaway: "šŸŽ‰ **GIVEAWAY** šŸŽ‰", - giveawayDescription: - "šŸŽ Prize: **{award}**\nšŸŽŠ Hosted by: {hostedBy}\nā²ļø Winner(s): `{winners}` \nšŸ™ Entrants: {totalParticipants} \n\n**Requirements:** {requirements}", - endedGiveawayDescription: - "šŸŽ Prize: **{award}**\nšŸŽŠ Hosted by: {hostedBy}\nā²ļø Winner(s): {winners} \nšŸ™ Entrants: {totalParticipants}", - giveawayFooterImage: "https://emoji.gg/assets/emoji/3461-giveaway.gif", - winMessage: - "Congratulations {winners}! You have won **{award}** from total `{totalParticipants}` entrants!", - rerolledMessage: "Rerolled! {winner} is the new winner of the giveaway!", - toParticipate: "**Click the `Enter` button to enter the giveaway!**", - newParticipant: - "You have successfully entered for this giveaway! There are total `{totalParticipants}` entrants", - alreadyParticipated: "**You have already participated in this giveaway!**", - noParticipants: "There isn't enough entrant in this giveaway!", - noRole: - "You don't have the required role(s)\n{requiredRoles}\n for the giveaway!", - dmMessage: - "You have won a giveaway in **{guildName}**!\nPrize: [{award}]({giveawayURL})", - noWinner: - "There isn't any winner in this giveaway due to not enough entrants", - alreadyEnded: "The giveaway had already ended!", - dropWin: "{winner} Won The Drop!!", - noWeeklyExp: - "you dont have the required minimum weekly xp to join this giveaway", - noLevel: "You dont have the minimum required level to join this giveaway", - nonoRole: - "You do not have the {requiredRoles} role(s) which is required to join this giveaway", - editParticipants: true, - }, -}); diff --git a/client/NYX.js b/client/NYX.js @@ -30,8 +30,8 @@ class NYX extends Client { super(options); this.slashCommands = new Collection(); this.hide = new Collection(); - this.esnipes = new Collection(); - this.snipes = new Collection(); + // this.esnipes = new Collection(); + // this.snipes = new Collection(); this.config = config; this.data = require("../util/functions/mongoose"); this.color = config.color; @@ -55,71 +55,72 @@ class NYX extends Client { "840225563193114624", // Command Test ]; const client = this; - require("../util/functions/economy")(client); - this.manager = new Manager({ - plugins: [ - new Spotify({ - clientID: process.env.SPOTIFY_ID, - clientSecret: process.env.SPOTIFY_SECRET, - }), - ], - nodes: [ - { - host: config.Lavalink.Host, - port: config.Lavalink.Port, - password: config.Lavalink.Password, - retryDelay: 5000, - }, - ], - autoPlay: true, - send: (id, payload) => { - const guild = client.guilds.cache.get(id); - if (guild) guild.shard.send(payload); - }, - }) - .on("nodeConnect", node => - console.log(`Node "${node.options.identifier}" has connected`) - ) - .on("nodeError", (node, error) => - console.log( - `Node "${node.options.identifier}" encountered an error: ${error.message}` - ) - ) - .on("trackStart", (player, track) => { - const channel = client.channels.cache.get(player.textChannel); - const embed = new MessageEmbed() - .setColor(config.color) - .setAuthor( - `Now Playing`, - "https://cdn.discordapp.com/emojis/897017864085712936.gif" - ) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setThumbnail(player.queue.current.displayThumbnail()) - .setDescription(`[${track.title}](${track.uri})`) - .addField( - "Duration", - `\`${utils.prettyMs(track.duration, { - colonNotation: true, - })}\``, - true - ); - channel.send({ embeds: [embed] }); - }) - .on("queueEnd", player => { - const channel = client.channels.cache.get(player.textChannel); - const embed2 = new MessageEmbed() - .setColor(config.color) - .setAuthor( - `Queue has ended`, - "https://cdn.discordapp.com/emojis/897017864085712936.gif" - ) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp(); - channel.send({ embeds: [embed2] }); - // player.destroy(); Remove if 24/7 - }); } + // require("../util/functions/economy")(client); + // this.manager = new Manager({ + // plugins: [ + // new Spotify({ + // clientID: process.env.SPOTIFY_ID, + // clientSecret: process.env.SPOTIFY_SECRET, + // }), + // ], + // nodes: [ + // { + // host: config.Lavalink.Host, + // port: config.Lavalink.Port, + // password: config.Lavalink.Password, + // retryDelay: 5000, + // }, + // ], + // autoPlay: true, + // send: (id, payload) => { + // const guild = client.guilds.cache.get(id); + // if (guild) guild.shard.send(payload); + // }, + // }) + // .on("nodeConnect", node => + // console.log(`Node "${node.options.identifier}" has connected`) + // ) + // .on("nodeError", (node, error) => + // console.log( + // `Node "${node.options.identifier}" encountered an error: ${error.message}` + // ) + // ) + // .on("trackStart", (player, track) => { + // const channel = client.channels.cache.get(player.textChannel); + // const embed = new MessageEmbed() + // .setColor(config.color) + // .setAuthor( + // `Now Playing`, + // "https://cdn.discordapp.com/emojis/897017864085712936.gif" + // ) + // .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) + // .setTimestamp() + // .setThumbnail(player.queue.current.displayThumbnail()) + // .setDescription(`[${track.title}](${track.uri})`) + // .addField( + // "Duration", + // `\`${utils.prettyMs(track.duration, { + // colonNotation: true, + // })}\``, + // true + // ); + // channel.send({ embeds: [embed] }); + // }) + // .on("queueEnd", player => { + // const channel = client.channels.cache.get(player.textChannel); + // const embed2 = new MessageEmbed() + // .setColor(config.color) + // .setAuthor( + // `Queue has ended`, + // "https://cdn.discordapp.com/emojis/897017864085712936.gif" + // ) + // .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) + // .setTimestamp(); + // channel.send({ embeds: [embed2] }); + // // player.destroy(); Remove if 24/7 + // }); + // } start() { require("../util/dist/handler")(this); this.data diff --git a/client/StarboardClient.js b/client/StarboardClient.js @@ -1,6 +0,0 @@ -const { StarboardClient } = require("cath"); -const client = require(".."); -module.exports = new StarboardClient({ - client, - color: client.color, -}); diff --git a/command/Fun/ascii.js b/command/Fun/ascii.js @@ -1,23 +0,0 @@ -const axios = require("axios"); -module.exports = { - name: "ascii", - description: "Converts text into ASCII art", - category: "Fun", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "text", - description: "The text you want to convert", - required: true, - }, - ], - run: async (client, interaction, args) => { - const data = await axios - .get( - `https://artii.herokuapp.com/make?text=${encodeURIComponent(args[0])}` - ) - .then(res => res.data); - interaction.followUp(`\`\`\`${data}\`\`\``); - }, -}; diff --git a/command/Fun/dare.js b/command/Fun/dare.js @@ -1,21 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const tnd = require("../../util/Data/tnd.json"); -module.exports = { - name: "dare", - description: "The maturity level of the topics the question can relate to", - run: async (client, interaction) => { - const embed = new MessageEmbed() - .setAuthor({ - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dyamic: true }), - }) - .setTitle(tnd.dare[Math.round(Math.random() * tnd.dare.length - 1)]) - .setColor(client.color) - .setFooter({ - text: `Made by ${client.author}`, - iconURL: client.user.displayAvatarURL(), - }) - .setTimestamp(); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/command/Fun/hangman.js b/command/Fun/hangman.js @@ -1,97 +0,0 @@ -const axios = require("axios"); -const { MessageEmbed } = require("discord.js"); -const playing = new Set(); -module.exports = { - name: "hangman", - description: "Play a hangman game", - category: "Fun", - run: async (client, interaction) => { - await interaction.deleteReply(); - if (playing.has(interaction.channel.id)) { - return interaction.followUp({ - content: "Only one game may be occurring per channel.", - }); - } - playing.add(interaction.channel.id); - try { - const data = await axios - .get(`${process.env.api}/api/v1/fun/hangman`) - .then(res => res.data); - const word = data.word; - let points = 0; - let displayText = null; - let guessed = false; - const confirmation = []; - const incorrect = []; - const display = new Array(word.length).fill("ā—Æ"); - while (word.length !== confirmation.length && points < 6) { - const embed = new MessageEmbed() - .setColor(client.color) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setTitle("Hangman game").setDescription(` - ${displayText === null ? "Here we go!" : displayText ? "Good job!" : "Nope!"} - \`${display.join(" ")}\`. Which letter do you choose? - Incorrect Tries: ${incorrect.join(", ") || "None"} - \`\`\` - . ā”Œā”€ā”€ā”€ā”€ā”€ā” - . ā”ƒ ā”‹ - . ā”ƒ ${points > 0 ? "O" : ""} - . ā”ƒ ${points > 2 ? "/" : " "}${points > 1 ? "|" : ""}${ - points > 3 ? "\\" : "" - } - . ā”ƒ ${points > 4 ? "/" : ""}${points > 5 ? "\\" : ""} - ============= - \`\`\` - `); - await interaction.channel.send({ embeds: [embed] }); - const filter = res => { - const choice = res.content.toLowerCase(); - return ( - res.author.id === interaction.user.id && - !confirmation.includes(choice) && - !incorrect.includes(choice) - ); - }; - const guess = await interaction.channel.awaitMessages({ - filter, - max: 1, - time: 30000, - }); - if (!guess.size) { - await interaction.channel.send({ content: "Sorry, time is up!" }); - break; - } - const choice = guess.first().content.toLowerCase(); - if (choice === "end") break; - if (choice.length > 1 && choice === word) { - guessed = true; - break; - } else if (word.includes(choice)) { - displayText = true; - for (let i = 0; i < word.length; i++) { - if (word.charAt(i) !== choice) continue; // eslint-disable-line max-depth - confirmation.push(word.charAt(i)); - display[i] = word.charAt(i); - } - } else { - displayText = false; - if (choice.length === 1) incorrect.push(choice); - points++; - } - } - playing.delete(interaction.channel.id); - if (word.length === confirmation.length || guessed) { - return interaction.channel.send({ - content: `You won. The word is **${word}**!`, - }); - } - return interaction.channel.send({ - content: `You lost. The word is **${word}**.`, - }); - } catch (err) { - console.log(err); - playing.delete(interaction.channel.id); - } - }, -}; diff --git a/command/Fun/say.js b/command/Fun/say.js @@ -1,20 +0,0 @@ -const { Util } = require("discord.js"); -module.exports = { - name: "say", - description: "Pretend a bot to say", - usage: "(Words)", - category: "Fun", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "words", - description: "The words to say", - required: true, - }, - ], - run: async (client, interaction, args) => { - await interaction.deleteReply(); - interaction.channel.send(Util.cleanContent(args[0], interaction.channel)); - }, -}; diff --git a/command/Fun/ship.js b/command/Fun/ship.js @@ -1,42 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const block = "ā¬›"; -const heart = "šŸŸ„"; - -module.exports = { - name: "ship", - description: "Ship an user to an user", - usage: "(User) (User)", - category: "Fun", - options: [ - { - type: 6, - name: "1stuser", - description: "The user you want to ship", - required: true, - }, - { - type: 6, - name: "2nduser", - description: "The user you want to ship", - required: true, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const user1 = interaction.guild.members.cache.get(args[0]).user.username; - const user2 = interaction.guild.members.cache.get(args[1]).user.username; - const loveEmbed = new MessageEmbed() - .setColor("dd2e44") - .setFooter({ text: `Shipped by ${interaction.user.tag}` }) - .setTimestamp() - .setTitle(`šŸ’˜ | Shipping ${user1} and ${user2} | šŸ’˜`) - .setDescription(`šŸ”» | ${user1} \n${ship()}\nšŸ”ŗ | ${user2}`); - interaction.followUp({ embeds: [loveEmbed] }); - }, -}; -function ship() { - const hearts = Math.floor(Math.random() * 100); - const hearte = hearts / 10; - const str = `${heart.repeat(hearte)}${block.repeat(10 - hearte)} ${hearts}%`; - return str; -} diff --git a/command/Fun/simprate.js b/command/Fun/simprate.js @@ -1,33 +0,0 @@ -const { MessageEmbed } = require("discord.js"); - -module.exports = { - name: "simprate", - description: "Check how simp is the user", - usage: "(@User)", - category: "Fun", - options: [ - { - type: 6, - name: "user", - description: "The user you want to see", - required: true, - }, - ], - run: async (client, interaction, args) => { - const simp = Math.floor(Math.random() * 100); - const user = interaction.guild.members.cache.get(args[0]); - interaction.followUp({ - embeds: [ - new MessageEmbed() - .setTitle(`${user.user.username}'s simp rate`) - .setDescription(`${user.user.username} is a ${simp}% simp`) - .setColor(client.color) - .setFooter({ - text: `Made by ${client.author}`, - iconURL: client.user.displayAvatarURL(), - }) - .setTimestamp(), - ], - }); - }, -}; diff --git a/command/Fun/truth.js b/command/Fun/truth.js @@ -1,21 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const tnd = require("../../util/Data/tnd.json"); -module.exports = { - name: "truth", - description: "Gives a random question that has to be answered truthfully", - run: async (client, interaction, args) => { - const embed = new MessageEmbed() - .setAuthor({ - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dyamic: true }), - }) - .setTitle(tnd.truth[Math.round(Math.random() * tnd.truth.length - 1)]) - .setColor(client.color) - .setFooter({ - text: `Made by ${client.author}`, - iconURL: client.user.displayAvatarURL(), - }) - .setTimestamp(); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/command/Fun/wyr.js b/command/Fun/wyr.js @@ -1,31 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const questions = require("../../util/Data/wyr.json"); -module.exports = { - name: "wyr", - description: "Send some would-you rather questions", - run: async (client, interaction, args) => { - const messagetext = questions[Math.floor(Math.random() * questions.length)]; - const question = messagetext.split("Would you rather ")[1]; - const q = question.split(" or "); - const Option1 = q[0]; - const Option2 = q[1]; - const embed = new MessageEmbed() - .setTitle("Would You Rather") - .setDescription( - `šŸ‡¦ ${Option1} \n\n **OR** \n\n :regional_indicator_b: ${Option2}` - ) - .setAuthor({ - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dyamic: true }), - }) - .setColor(client.color) - .setFooter({ - text: `Made by ${client.author}`, - iconURL: client.user.displayAvatarURL(), - }) - .setTimestamp(); - wyrmessage = await interaction.followUp({ embeds: [embed] }); - wyrmessage.react("šŸ‡¦"); - wyrmessage.react("šŸ‡§"); - }, -}; diff --git a/command/Moderation/warn.js b/command/Moderation/warn.js @@ -1,273 +0,0 @@ -const db = require("../../models/warns"); -const moment = require("moment"); -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "warn", - UserPerms: ["MANAGE_MESSAGES"], - description: "Add/remove/show warnings of an user", - category: "Moderation", - options: [ - { - type: "SUB_COMMAND", - name: "add", - description: "Warn a user", - options: [ - { - type: 6, - name: "user", - description: "The user you want to warn", - required: true, - }, - { - type: 3, - name: "reason", - description: "The reason you want to warn", - required: false, - }, - ], - }, - { - type: "SUB_COMMAND", - name: "list", - description: "Show a list of warnings of an user", - options: [ - { - type: 6, - name: "user", - description: "The user to show the list", - required: true, - }, - ], - }, - { - type: "SUB_COMMAND", - name: "remove", - description: "Remove a latest warn for an user", - options: [ - { - type: 6, - name: "user", - description: "The user to remove warn", - required: true, - }, - { - type: 4, - name: "number", - description: "The number of warn", - required: true, - }, - ], - }, - { - type: "SUB_COMMAND", - name: "clear", - description: "Clear an user's warns", - options: [ - { - type: 6, - name: "user", - description: "The user to clear warns", - required: true, - }, - ], - }, - ], - run: async (client, interaction, args) => { - try { - if (args[0] == "add") { - const user = interaction.guild.members.cache.get(args[1]); - const reason = args[2] || "No reason provided"; - if (user.id === interaction.user.id) { - interaction.followUp({ content: "You can't warn yourself" }); - } - if ( - interaction.member.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ content: "You don't have enough hierarchy" }); - } - if ( - interaction.guild.me.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ - content: "Bot doesn't have enough hierarchy", - }); - } - if (reason.length > 1024) reason = reason.slice(0, 1021) + "..."; - db.findOne( - { Guild: interaction.guild.id, User: user.id }, - async (err, data) => { - if (!data) { - data = new db({ - Guild: interaction.guild.id, - User: user.id, - Warns: [ - { - Reason: reason, - Moderator: interaction.user.id, - Timestamp: Date.now(), - }, - ], - }); - } else { - data.Warns.push({ - Reason: reason, - Moderator: interaction.user.id, - Timestamp: Date.now(), - }); - } - data.save(); - } - ); - user - .send({ - content: `You have been warned in **${interaction.guild.name}** for **${reason}**`, - }) - .catch(e => {}); - const embed = new MessageEmbed() - .setTitle("User Warned") - .addField("**Moderator**", interaction.user.tag, true) - .addField("**User**", user.user.tag, true) - .addField("**Reason**", reason, true) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) - .setColor(client.color); - interaction.followUp({ embeds: [embed] }); - } else if (args[0] == "list") { - const user = interaction.guild.members.cache.get(args[1]); - db.findOne( - { Guild: interaction.guild.id, User: user.id }, - async (err, data) => { - if (data.Warns.map(e => e).length > 0) { - interaction.followUp({ - embeds: [ - new MessageEmbed() - .setTitle(`${user.user.tag}'s warns`) - .setDescription( - data.Warns.map( - (w, i) => - `\`${i + 1}\` | Moderator: ${ - interaction.guild.members.cache.get(w.Moderator) || - "Unknown" - }\nReason: ${w.Reason}\nDate: ${moment( - w.Timestamp - ).format("MMMM Do YYYY")}` - ).join("\n\n") - ) - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .setTimestamp() - .setColor(client.color), - ], - }); - } else { - interaction.followUp({ - content: `User doesn't have any warns`, - }); - } - } - ); - } else if (args[0] == "remove") { - const user = interaction.guild.members.cache.get(args[1]); - if ( - interaction.member.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ content: "You don't have enough hierarchy" }); - } - if ( - interaction.guild.me.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ - content: "Bot doesn't have enough hierarchy", - }); - } - db.findOne( - { Guild: interaction.guild.id, User: user.id }, - async (err, data) => { - if (err) throw err; - if (data) { - const number = args[2] - 1; - data.Warns.splice(number, 1); - const embed = new MessageEmbed() - .setTitle("Warn Removed") - .addField("**Moderator**", interaction.user.tag, true) - .addField("**User**", user.user.tag, true) - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .setTimestamp() - .setThumbnail( - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color); - interaction.followUp({ embeds: [embed] }); - data.save(); - } else { - interaction.followUp({ - content: `User doesn't have any warns`, - }); - } - } - ); - } else { - const user = interaction.guild.members.cache.get(args[1]); - if ( - interaction.member.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ content: "You don't have enough hierarchy" }); - } - if ( - interaction.guild.me.roles.highest.position < - user.roles.highest.position - ) { - interaction.followUp({ - content: "Bot doesn't have enough hierarchy", - }); - } - db.findOne( - { Guild: interaction.guild.id, User: user.id }, - async (err, data) => { - if (data) { - await db.findOneAndDelete({ - Guild: interaction.guild.id, - User: user.id, - }); - interaction.followUp({ - embeds: [ - new MessageEmbed() - .setTitle(`Warns Cleared`) - .addField("**Moderator**", interaction.user.tag, true) - .addField("**User**", user.user.tag, true) - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .setTimestamp() - .setThumbnail( - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setColor(client.color), - ], - }); - } else { - interaction.followUp({ - content: `User doesn't have any warns`, - }); - } - } - ); - } - } catch (e) { - console.log(e); - interaction.followUp({ content: `**Error**: ${e.message}` }); - } - }, -}; diff --git a/data/APEX/legends.json b/data/APEX/legends.json @@ -1,24 +0,0 @@ -{ - "Banglore": [ - { - "legend_image": "https://media.discordapp.net/attachments/973918659007377408/973918831443574834/unknown.png?width=548&height=613", - "intro": "https://youtu.be/JyJhFYNob30", - "wiki": "https://apexlegends.fandom.com/wiki/Bangalore", - "codename": "Professional Soldier", - "type": "offensive", - "avalable": true, - "tactical": "Smoke Launcher", - "tactical_description": "Fire a high-velocity smoke canister that explodes into a smoke wall on impact.", - "tactical_cooldown": 33, - "tactical_link": "https://apexlegends.fandom.com/wiki/Bangalore#Smoke_Launcher", - "passive": " Double Time", - "passive_description": "Taking fire while sprinting makes you move faster for a brief time.", - "passive_link": "https://apexlegends.fandom.com/wiki/Bangalore#Double_Time", - "ultimate": "Rolling Thunder", - "ultimate_description": "Call in an artillery strike that slowly creeps across the landscape.", - "ultimate_chargetime": 180, - "ultimate_link": "https://apexlegends.fandom.com/wiki/Bangalore#Rolling_Thunder" - } - ], - "Bloodhound": "" -} -\ No newline at end of file diff --git a/draw.js b/draw.js @@ -1,82 +0,0 @@ -const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); -const draws = require("./util/Data/draws.json"); -module.exports = { - name: "draw", - description: "Buy a lucky draw", - run: async (client, message, args, utils) => { - const embed = new MessageEmbed() - .setTitle("**__Daily Lucky Draw__**") - .setColor(client.color) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setDescription( - "Welcome to the Lucky Draw,\nclick `Spin`, so that the draw spins and hits a random item.\nClick `Info` to find out how high the probability is\n that a particular item will be unlocked" - ) - .addFields( - draws[0].map(c => { - return { name: c.name, value: c.emoji, inline: true }; - }) - ); - - const button1 = new MessageButton() - .setStyle("SUCCESS") - .setEmoji("šŸ”„") - .setLabel("Spin") - .setCustomId("spin"); - const button2 = new MessageButton() - .setStyle("PRIMARY") - .setEmoji("894962394932064346") - .setLabel("Info") - .setCustomId("spininfo"); - - const row = new MessageActionRow().addComponents([button1, button2]); - const msg = await message.channel.send({ - embeds: [embed], - components: [row], - }); - const filter = i => - ["spin", "spininfo"].includes(i.customId) && - i.user.id === message.author.id; - const collector = msg.createMessageComponentCollector({ - filter, - time: 999999, - }); - function select() { - let pick = Math.floor(Math.random() * 100); - for (const g in draws[0]) { - pick -= draws[0][g].percent; - if (pick <= 0) { - return `You got **${draws[0][g].name}** with propability **${draws[0][g].percent}%**`; - } - } - } - console.log(utils.colorize("test").magenta); - collector.on("collect", i => { - if (i.customId === "spin") { - i.reply({ - content: select(), - }); - } - if (i.customId === "spininfo") { - i.reply({ - embeds: [ - new MessageEmbed() - .setTitle("**__Information Table__**") - .addFields( - draws[0].map(c => { - return { - name: `**${c.name}**`, - value: `Percentage: ${c.percent}%`, - inline: true, - }; - }) - ) - .addField("Name:", "**Item 1**") - .addField("Percent:", "**69**") - .addField("Emoji:", ":bughuntergold:"), - ], - }); - } - }); - }, -}; diff --git a/events/afk.js b/events/afk.js @@ -1,25 +0,0 @@ -const client = require("../"); -client.on("messageCreate", async message => { - if (message.author.bot || !message.guild) return; - const dataa = await client.data.getUser(message.author.id); - if (dataa?.AFK) { - message.reply({ - content: `Welcome back <@${dataa.User}>! I have removed your AFK status.`, - }); - const nothahaa = message.guild.members.cache.get(message.author.id); - nothahaa.setNickname(`${message.author.username}`).catch(); - await client.data.DelAFK(message.author.id); - } - if (message.mentions.users.first()?.id) { - const data1 = await client.data.getUser( - message.mentions.members.first()?.id - ); - if (data1?.AFK) { - message.reply({ - content: `**${ - message.mentions.members.first().user.tag - }** is in afk **(${data1.AFK})**`, - }); - } - } -}); diff --git a/events/interactionCreate.js b/events/interactionCreate.js @@ -40,12 +40,12 @@ client.on("interactionCreate", async interaction => { if (!guildDB) return; const userDB = await client.data.getUser(interaction.user.id); if (!userDB) return; - const userEconDB = await client.data.getUserEcon(interaction.user.id); + // const userEconDB = await client.data.getUserEcon(interaction.user.id); data.Guild = guildDB; data.User = userDB; - data.UserEcon = userEconDB; + // data.UserEcon = userEconDB; if (!guildDB) await client.data.CreateGuild(interaction.guild.id); - if (!userEconDB) await client.createProfile(interaction.user.id); + //if (!userEconDB) await client.createProfile(interaction.user.id); if (data.User) { if (data.User.Blacklist) { return interaction.followUp({ diff --git a/events/raw.js b/events/raw.js @@ -1,2 +0,0 @@ -const client = require(".."); -client.on("raw", c => client.manager.updateVoiceState(c)); diff --git a/events/starboard.js b/events/starboard.js @@ -1,8 +0,0 @@ -const client = require(".."); -const starboardclient = require("../client/StarboardClient"); -client.on("messageReactionAdd", async reaction => { - starboardclient.listener(reaction); -}); -client.on("messageReactionRemove", async reaction => { - starboardclient.listener(reaction); -}); diff --git a/events/voiceStateUpdate.js b/events/voiceStateUpdate.js @@ -1,63 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const client = require(".."); -client.on("voiceStateUpdate", async (oldState, newState) => { - const guildId = newState.guild.id; - const player = client.manager.get(guildId); - if (!player || player.state !== "CONNECTED") return; - - const stateChange = {}; - if (oldState.channel === null && newState.channel !== null) { - stateChange.type = "JOIN"; - } - if (oldState.channel !== null && newState.channel === null) { - stateChange.type = "LEAVE"; - } - if (oldState.channel !== null && newState.channel !== null) { - stateChange.type = "MOVE"; - } - if (oldState.channel === null && newState.channel === null) return; - if (newState.serverMute == true && oldState.serverMute == false) { - return player.pause(true); - } - if (newState.serverMute == false && oldState.serverMute == true) { - return player.pause(false); - } - if (stateChange.type === "MOVE") { - if (oldState.channel.id === player.voiceChannel) stateChange.type = "LEAVE"; - if (newState.channel.id === player.voiceChannel) stateChange.type = "JOIN"; - } - if (stateChange.type === "JOIN") stateChange.channel = newState.channel; - if (stateChange.type === "LEAVE") stateChange.channel = oldState.channel; - if (!stateChange.channel || stateChange.channel.id !== player.voiceChannel) { - return; - } - stateChange.members = stateChange.channel.members.filter( - member => !member.user.bot - ); - switch (stateChange.type) { - case "JOIN": - if (stateChange.members.size === 1 && player.paused) { - const emb = new MessageEmbed() - .setAuthor(`Resumed`, client.user.displayAvatarURL()) - .setColor(client.config.color) - .setDescription( - `Resuming the player as somebody join the voice channel` - ); - client.channels.cache.get(player.textChannel).send({ embeds: [emb] }); - player.pause(false); - } - break; - case "LEAVE": - if (stateChange.members.size === 0 && !player.paused && player.playing) { - player.pause(true); - const emb = new MessageEmbed() - .setAuthor(`Paused`, client.user.displayAvatarURL()) - .setColor(client.config.color) - .setDescription( - `The player has been paused as nobody is in the voice channel` - ); - client.channels.cache.get(player.textChannel).send({ embeds: [emb] }); - } - break; - } -}); diff --git a/start.bat b/start.bat @@ -1 +1,3 @@ -node . -\ No newline at end of file +title cath +node . +pause +\ No newline at end of file diff --git a/client/CodeClient.js b/unused/client/CodeClient.js diff --git a/unused/client/GiveawaysClient.js b/unused/client/GiveawaysClient.js @@ -0,0 +1,38 @@ +const { GiveawaysClient } = require("cath"); +const client = require("../.."); +require("dotenv").config(); +module.exports = new GiveawaysClient({ + client, + MongooseConnectionURI: process.env.MONGO, + GiveawayMessages: { + dmWinner: true, + giveaway: "šŸŽ‰ **GIVEAWAY** šŸŽ‰", + giveawayDescription: + "šŸŽ Prize: **{award}**\nšŸŽŠ Hosted by: {hostedBy}\nā²ļø Winner(s): `{winners}` \nšŸ™ Entrants: {totalParticipants} \n\n**Requirements:** {requirements}", + endedGiveawayDescription: + "šŸŽ Prize: **{award}**\nšŸŽŠ Hosted by: {hostedBy}\nā²ļø Winner(s): {winners} \nšŸ™ Entrants: {totalParticipants}", + giveawayFooterImage: "https://emoji.gg/assets/emoji/3461-giveaway.gif", + winMessage: + "Congratulations {winners}! You have won **{award}** from total `{totalParticipants}` entrants!", + rerolledMessage: "Rerolled! {winner} is the new winner of the giveaway!", + toParticipate: "**Click the `Enter` button to enter the giveaway!**", + newParticipant: + "You have successfully entered for this giveaway! There are total `{totalParticipants}` entrants", + alreadyParticipated: "**You have already participated in this giveaway!**", + noParticipants: "There isn't enough entrant in this giveaway!", + noRole: + "You don't have the required role(s)\n{requiredRoles}\n for the giveaway!", + dmMessage: + "You have won a giveaway in **{guildName}**!\nPrize: [{award}]({giveawayURL})", + noWinner: + "There isn't any winner in this giveaway due to not enough entrants", + alreadyEnded: "The giveaway had already ended!", + dropWin: "{winner} Won The Drop!!", + noWeeklyExp: + "you dont have the required minimum weekly xp to join this giveaway", + noLevel: "You dont have the minimum required level to join this giveaway", + nonoRole: + "You do not have the {requiredRoles} role(s) which is required to join this giveaway", + editParticipants: true, + }, +}); diff --git a/unused/client/StarboardClient.js b/unused/client/StarboardClient.js @@ -0,0 +1,6 @@ +const { StarboardClient } = require("cath"); +const client = require("../.."); +module.exports = new StarboardClient({ + client, + color: client.color, +}); diff --git a/client/URLClient.js b/unused/client/URLClient.js diff --git a/util/dist/cmds.js b/unused/cmds.js diff --git a/unused/commands/Config/panel.js b/unused/commands/Config/panel.js @@ -1,28 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -const Schema = require("../../models/reaction"); - -module.exports = { - name: "panel", - description: "Reaction-Role Panel", - UserPerm: "ADMINISTRATOR", - category: "Config", - run: async (client, message, args) => { - const channel = message.mentions.channels.first() || message.channel; - Schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (!data) return client.err(message, "Config", "panel", 10); - const mapped = Object.keys(data.Roles) - .map((value, index) => { - const role = message.guild.roles.cache.get(data.Roles[value][0]); - return `${index + 1}) ${data.Roles[value][1].raw} - ${role}`; - }) - .join("\n\n"); - channel.send(new MessageEmbed().setDescription(mapped)).then(msg => { - data.Message = msg.id; - data.save(); - - const reactions = Object.values(data.Roles).map(val => val[1].id); // ?? val[1].raw); - reactions.map(emoji => msg.react(emoji)); - }); - }); - }, -}; diff --git a/unused/commands/Config/rr-add.js b/unused/commands/Config/rr-add.js @@ -1,46 +0,0 @@ -const { Client, Message, MessageEmbed, Util } = require("discord.js"); -const Schema = require("../../models/reaction"); -module.exports = { - name: "rr-add", - UserPerm: "ADMINISTRATOR", - description: "Create reaction role for server", - usage: "(Role) (emoji(Must be in server)", - category: "Config", - run: async (client, message, args) => { - const role = - message.mentions.roles.first() || - message.guild.roles.cache.get(args[0]) || - message.guild.roles.cache.find(r => r.name == args[0]); - const [, emoji] = args; - if (!emoji) return client.err(message, "Config", "rr-add", 11); - const parsedEmoji = Util.parseEmoji(emoji); - Schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (data) { - data.Roles[parsedEmoji.name] = [ - role.id, - { - id: parsedEmoji.id, - raw: emoji, - }, - ]; - await Schema.findOneAndUpdate({ Guild: message.guild.id }, data); - } - else { - new Schema({ - Guild: message.guild.id, - Message: 0, - Roles: { - [parsedEmoji.name]: [ - role.id, - { - id: parsedEmoji.id, - raw: emoji, - }, - ], - }, - }).save(); - } - message.channel.send(`Added ${role.name}.`); - }); - }, -}; diff --git a/unused/commands/Config/rr-rmv.js b/unused/commands/Config/rr-rmv.js @@ -1,34 +0,0 @@ -const Schema = require("../../models/reaction"); -module.exports = { - name: "rr-rmv", - UserPerm: "ADMINISTRATOR", - description: "Remove reaction role for server", - category: "Config", - run: async (client, message, args, utils) => { - message.channel - .send({ content: "**Do you want to remove the reaction roles?**" }) - .then(async msg => { - Schema.findOne({ Guild: message.guild.id }, async (err, data) => { - if (err) throw err; - if (!data) return client.err(message, "Config", "rr-rmv", 10); - }); - const emoji = await utils.confirmation( - msg, - message.author, - ["āœ…", "āŒ"], - 10000, - ); - if (emoji === "āœ…") { - msg.delete(); - await Schema.findOneAndDelete({ Guild: message.guild.id }); - message.channel.send({ - content: `Removed reaction roles for this server.`, - }); - } - if (emoji === "āŒ") { - msg.delete(); - message.channel.send({ content: "Cancelled." }); - } - }); - }, -}; diff --git a/command/Economy/bal.js b/unused/commands/Economy/bal.js diff --git a/command/Economy/bet.js b/unused/commands/Economy/bet.js diff --git a/command/Economy/blackjack.js b/unused/commands/Economy/blackjack.js diff --git a/command/Economy/buy.js b/unused/commands/Economy/buy.js diff --git a/command/Economy/daily.js b/unused/commands/Economy/daily.js diff --git a/command/Economy/gift.js b/unused/commands/Economy/gift.js diff --git a/command/Economy/give.js b/unused/commands/Economy/give.js diff --git a/command/Economy/gun.js b/unused/commands/Economy/gun.js diff --git a/command/Economy/inv.js b/unused/commands/Economy/inv.js diff --git a/command/Economy/multiplier.js b/unused/commands/Economy/multiplier.js diff --git a/command/Economy/profile.js b/unused/commands/Economy/profile.js diff --git a/command/Economy/rich.js b/unused/commands/Economy/rich.js diff --git a/command/Economy/shop.js b/unused/commands/Economy/shop.js diff --git a/command/Economy/slots.js b/unused/commands/Economy/slots.js diff --git a/command/Economy/steal.js b/unused/commands/Economy/steal.js diff --git a/command/Economy/work.js b/unused/commands/Economy/work.js diff --git a/unused/commands/Fun/busted.js b/unused/commands/Fun/busted.js @@ -1,27 +0,0 @@ -const { MessageAttachment } = require("discord.js"); -module.exports = { - name: "busted", - description: "Bust someone", - category: "Fun", - options: [ - { - type: 6, - name: "user", - description: "The user you want to use the effect", - required: true, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const user = interaction.guild.members.cache.get(args[0]); - const ima = new MessageAttachment( - `${ - process.env.api - }/api/v1/image/busted?image=${user.user.displayAvatarURL({ - format: "png", - size: 2048, - })}`, - ); - interaction.followUp({ files: [ima] }); - }, -}; diff --git a/unused/commands/Fun/choose.js b/unused/commands/Fun/choose.js @@ -1,73 +0,0 @@ -module.exports = { - name: "choose", - description: "Choose random things", - usage: "(Choices)", - category: "Fun", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "first", - description: "The first choice", - required: true, - }, - { - type: 3, - name: "second", - description: "The second choice", - required: true, - }, - { - type: 3, - name: "third", - description: "The third choice", - required: false, - }, - { - type: 3, - name: "forth", - description: "The forth choice", - required: false, - }, - { - type: 3, - name: "fifth", - description: "The fifth choice", - required: false, - }, - { - type: 3, - name: "sixth", - description: "The sixth choice", - required: false, - }, - { - type: 3, - name: "seventh", - description: "The seventh choice", - required: false, - }, - { - type: 3, - name: "eighth", - description: "The eighth choice", - required: false, - }, - { - type: 3, - name: "ninth", - description: "The ninth choice", - required: false, - }, - { - type: 3, - name: "tenth", - description: "The tenth choice", - required: false, - }, - ], - run: async (client, interaction, args) => { - const choices = args[Math.floor(Math.random() * args.length)]; - interaction.followUp(`I will choose - \`${choices}\``); - }, -}; diff --git a/unused/commands/Fun/coinflip.js b/unused/commands/Fun/coinflip.js @@ -1,17 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "coinflip", - description: "Flip a coin", - category: "Fun", - run: async (client, interaction, args) => { - const HT = ["Heads!", "Tails!"]; - const pick = HT[Math.floor(Math.random() * HT.length)]; - const embed = new MessageEmbed() - .setColor(client.color) - .setTitle("CoinFilp Game") - .setTimestamp() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setDescription(pick); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/unused/commands/Fun/connect4.js b/unused/commands/Fun/connect4.js @@ -1,321 +0,0 @@ -const { Client, Message, MessageEmbed } = require("discord.js"); -module.exports = { - name: "connect4", - aliases: ["c4"], - usage: "(User)", - description: "Play a connect 4 game with a user", - category: "Fun", - run: async (client, message, args) => { - const challenger = message.member; - const oppenent = message.mentions.members.first(); - - if (!oppenent) return client.err(message, "Fun", "connect4", 1); - - const question = await message.channel.send( - `${oppenent}, would you like to play connect 4 against ${challenger}?`, - ); - - ["āœ…", "āŒ"].forEach(async el => await question.react(el)); - - const filter = (reaction, user) => - ["āœ…", "āŒ"].includes(reaction.emoji.name) && user.id === oppenent.id; - - const response = await question.awaitReactions(filter, { max: 1 }); - - const reaction = response.first(); - - if (reaction.emoji.name === "āŒ") {return question.edit("Looks like they didn't want to play");} - else { - await message.delete(); - await question.delete(); - - const board = [ - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ["āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ", "āšŖ"], - ]; - - const renderBoard = board => { - let tempString = ""; - for (const boardSection of board) { - tempString += `${boardSection.join("")}\n`; - } - - tempString = tempString.concat("1ļøāƒ£2ļøāƒ£3ļøāƒ£4ļøāƒ£5ļøāƒ£6ļøāƒ£7ļøāƒ£"); - - return tempString; - }; - - const initialState = renderBoard(board); - - const initial = new MessageEmbed().setDescription(initialState); - - const gameMessage = await message.channel.send(initial); - - ["1ļøāƒ£", "2ļøāƒ£", "3ļøāƒ£", "4ļøāƒ£", "5ļøāƒ£", "6ļøāƒ£", "7ļøāƒ£"].forEach(async el => - gameMessage.react(el), - ); - - const gameFilter = (reaction, user) => - ["1ļøāƒ£", "2ļøāƒ£", "3ļøāƒ£", "4ļøāƒ£", "5ļøāƒ£", "6ļøāƒ£", "7ļøāƒ£"].includes( - reaction.emoji.name, - ) && - (user.id === oppenent.id || user.id === challenger.id); - - const gameCollector = gameMessage.createReactionCollector(gameFilter); - - const gameData = [ - { member: challenger, playerColor: "šŸ”“" }, - { member: oppenent, playerColor: "šŸŸ”" }, - ]; - - let player = 0; - - const checkFour = (a, b, c, d) => - a === b && b === c && c === d && a !== "āšŖ"; - - const horizontalCheck = () => { - for (let i = 0; i < 6; i++) { - for (let j = 0; j < 4; j++) { - if ( - checkFour( - board[i][j], - board[i][j + 1], - board[i][j + 2], - board[i][j + 3], - ) - ) { - return [ - board[i][j], - board[i][j + 1], - board[i][j + 2], - board[i][j + 3], - ]; - } - } - } - }; - - const verticalCheck = () => { - for (let j = 0; j < 7; j++) { - for (let i = 0; i < 3; i++) { - if ( - checkFour( - board[i][j], - board[i + 1][j], - board[i + 2][j], - board[i + 3][j], - ) - ) { - return [ - board[i][j], - board[i + 1][j], - board[i + 2][j], - board[i + 3][j], - ]; - } - } - } - }; - - const diagonal1 = () => { - for (let col = 0; col < 4; col++) { - for (let row = 0; row < 3; row++) { - if ( - checkFour( - board[row][col], - board[row + 1][col + 1], - board[row + 2][col + 2], - board[row + 3][col + 3], - ) - ) { - return [ - board[row][col], - board[row + 1][col + 1], - board[row + 2], - board[col + 2], - board[row + 3][col + 3], - ]; - } - } - } - }; - - const diagonal2 = () => { - for (let col = 0; col < 4; col++) { - for (let row = 5; row > 2; row--) { - if ( - checkFour( - board[row][col], - board[row - 1][col + 1], - board[row - 2][col + 2], - board[row - 3][col + 3], - ) - ) { - return [ - board[row][col], - board[row - 1][col + 1], - board[row - 2][col + 2], - board[row - 3][col + 3], - ]; - } - } - } - }; - - const tieCheck = () => { - let count = 0; - for (const el of board) { - for (const string of el) { - if (string !== "āšŖ") count++; - } - } - if (count === 42) return true; - else return false; - }; - - const checks = [horizontalCheck, verticalCheck, diagonal1, diagonal2]; - - gameCollector.on("collect", (reaction, user) => { - if (user.id === gameData[player].member.id) { - const openSpaces = []; - - switch (reaction.emoji.name) { - case "1ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][0] === "āšŖ") openSpaces.push({ i, j: 0 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - - break; - case "2ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][1] === "āšŖ") openSpaces.push({ i, j: 1 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - - break; - case "3ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][2] === "āšŖ") openSpaces.push({ i, j: 2 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - break; - case "4ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][3] === "āšŖ") openSpaces.push({ i, j: 3 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - break; - case "5ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][4] === "āšŖ") openSpaces.push({ i, j: 4 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - break; - case "6ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][5] === "āšŖ") openSpaces.push({ i, j: 5 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - break; - case "7ļøāƒ£": - for (let i = 5; i > -1; i--) { - if (board[i][6] === "āšŖ") openSpaces.push({ i, j: 6 }); - } - if (openSpaces.length === 0) { - return message.channel.send( - `${gameData[player].member}, that column is already full. Choose a differnt one.`, - ); - } - else { - board[openSpaces[0].i][openSpaces[0].j] = - gameData[player].playerColor; - } - break; - } - - if (tieCheck()) { - const TieEmbed = new MessageEmbed().setDescription( - renderBoard(board), - ); - gameCollector.stop("Tie Game"); - return gameMessage.edit(`It was a tie game!`, { embed: TieEmbed }); - } - - for (const func of checks) { - const data = func(); - if (data) { - const WinEmbed = new MessageEmbed().setDescription( - renderBoard(board), - ); - gameCollector.stop(`${gameData[player].member.id} won`); - return gameMessage.edit( - `${gameData[player].member} has won the game!`, - { embed: WinEmbed }, - ); - } - } - - player = (player + 1) % 2; - - const newEmbed = new MessageEmbed().setDescription( - renderBoard(board), - ); - gameMessage.edit("", { embed: newEmbed }); - } - }); - } - }, -}; diff --git a/unused/commands/Fun/dino.js b/unused/commands/Fun/dino.js @@ -1,98 +0,0 @@ -module.exports = { - name: "dinochrome", - category: "Fun", - description: "Dinosaur in Chrome", - run: async (client, interaction, args) => { - await interaction.deleteReply(); - const msg = await interaction.channel.send(`---------------šŸ¦–`); - let time = 1 * 1000; - setTimeout(function() { - msg.edit(`-----------šŸ¦–----`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`----------šŸ¦–------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`--------šŸ¦–--------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`------šŸ¦–-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`-------šŸ¦–-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`---šŸŒµ-----šŸ¦–---------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`---šŸŒµ-šŸ¦–-------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`šŸ¦–\n ---šŸŒµ--------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`------šŸ¦–---šŸŒµ--------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`----šŸ¦–-----šŸŒµ----------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`-šŸŒµšŸŒµ-----šŸ¦–-------šŸŒµ--------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`----šŸŒµšŸŒµ-šŸ¦–----------šŸŒµ------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`šŸ¦–\n ---šŸŒµšŸŒµ-------------šŸŒµ---`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`-----šŸ¦–---šŸŒµšŸŒµ-------------šŸŒµ--`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`-------šŸ¦–-----šŸŒµšŸŒµ-------------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`šŸŽ‚----šŸ¦–--------šŸŒµšŸŒµ-----------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`---šŸŽ‚--šŸ¦–----------šŸŒµšŸŒµ---------`); - }, time); - time += 1.5 * 1000; - - setTimeout(function() { - msg.edit(`**ā“‚ā“˜ā“¢ā“¢ā“˜ā“žā“ ā’øā“žā“œā“Ÿā“›ā“”ā“£ā“”ā““ !**\n ---šŸŽ‚šŸ¦–----------šŸŒµšŸŒµ-------------`); - }, time); - }, -}; diff --git a/unused/commands/Fun/dog.js b/unused/commands/Fun/dog.js @@ -1,28 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "dog", - category: "Fun", - description: "Get a dog from reddit", - run: async (client, interaction, args) => { - const subreddits = ["dog", "dogs"]; - const subreddit = subreddits[Math.floor(Math.random() * subreddits.length)]; - const data = await getreddit(subreddit); - interaction.followUp({ - embeds: [ - new MessageEmbed({ - title: data.title, - url: data.url, - image: { url: data.image }, - timestamp: Date.now(), - footer: { text: data.footer }, - color: client.color, - author: { - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }), - }, - }), - ], - }); - }, -}; diff --git a/unused/commands/Fun/drop.js b/unused/commands/Fun/drop.js @@ -1,50 +0,0 @@ -module.exports = { - name: "drop", - usage: "{Channel} (Number)", - description: "Drops money to a channel", - category: "Economy", - options: [ - { - type: 7, - name: "channel", - description: "The channel you want to drop", - required: true, - channelTypes: ["GUILD_TEXT"], - }, - { - type: 4, - name: "cp", - description: "The amount of CP to drop", - required: true, - }, - ], - run: async (client, interaction, args) => { - const channel = interaction.guild.channels.cache.get(args[0]); - const coinsAmount = args[1]; - if (coinsAmount < 100) { - interaction.followUp({ - content: `You need to drop at least 100 ${client.currency}`, - }); - } else if ((await client.bal(interaction.user.id)) < coinsAmount) { - interaction.followUp({ content: "You don't have enough balance" }); - } else { - const filter = msg => - msg.guild.id === interaction.guild.id && msg.content === `claim`; - interaction.followUp({ - content: "The drop has started in " + channel.toString(), - }); - channel.send({ - content: `${interaction.user.username} has dropped a ${client.currency} bomb! Type \`claim\` to claim ${client.currency}!!`, - }); - client.rmv(interaction.user.id, parseInt(coinsAmount)); - channel.awaitMessages({ filter, max: 1, time: 60000 }).then(async msg => { - const id = msg.first().author.id; - const coinsToClaim = parseInt(coinsAmount); - await client.add(id, coinsToClaim, interaction); - msg.first().reply({ - content: `Congratultions! You have claimed **${coinsToClaim}** ${client.currency}!`, - }); - }); - } - }, -}; diff --git a/unused/commands/Fun/ds.js b/unused/commands/Fun/ds.js @@ -1,24 +0,0 @@ -const axios = require("axios"); -module.exports = { - name: "doublestruck", - description: "Doublestruck your text", - usage: "(text)", - category: "Fun", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "text", - description: "The text you want to convert", - required: true, - }, - ], - run: async (client, interaction, args) => { - const text = args[0].split(" ").join("+"); - const res = await axios.get( - "https://api.popcatdev.repl.co/doublestruck?text=" + text, - ); - const json = await res.json(); - interaction.followUp(json.text); - }, -}; diff --git a/unused/commands/Fun/fun.js b/unused/commands/Fun/fun.js @@ -1,130 +0,0 @@ -const { MessageEmbed, MessageAttachment } = require("discord.js"); -const { random8ball } = require("cath"); -module.exports = { - name: "fun", - description: "Fun commands", - options: [ - { - type: "SUB_COMMAND", - name: "8ball", - description: "8ball an answer", - options: [ - { - type: 3, - name: "question", - description: "The question you want to ask", - required: true, - }, - ], - }, - { - type: "SUB_COMMAND", - name: "rickroll", - description: "Rickroll?", - }, - { - type: "SUB_COMMAND", - name: "emojify", - description: "Emojify a sentence", - options: [ - { - type: 3, - name: "text", - description: "The text you want to convert", - required: true, - }, - ], - }, - { - type: "SUB_COMMAND", - name: "pp", - description: "Check how long is the user", - options: [ - { - type: 6, - name: "user", - description: "The user you want to see", - required: false, - }, - ], - }, - ], - run: async (client, interaction, args) => { - if (args[0] == "8ball") { - const data = await random8ball(); - const embed = new MessageEmbed() - .setAuthor( - `šŸŽ± ${interaction.user.tag} asks`, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setDescription( - `**šŸŽ±Question:** \n${args[1]} \n**šŸŽ±Answer:** \n ${data}` - ) - .setColor(client.color) - .setTimestamp() - .setURL(client.web) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - interaction.followUp({ embeds: [embed] }); - } else if (args[0] === "rickroll") { - const roll = [ - "Never gonna give you up", - "Never gonna let you down", - "Never gonna run around and desert you", - "Never gonna make you cry", - "Never gonna say goodbye", - "Never gonna tell a lie and hurt you", - ]; - const rick = roll[Math.floor(Math.random() * roll.length)]; - interaction.followUp({ - content: `**${rick}**`, - files: [ - new MessageAttachment( - "https://i.pinimg.com/originals/88/82/bc/8882bcf327896ab79fb97e85ae63a002.gif" - ), - ], - }); - } else if (args[0] === "emojify") { - const mapping = { - " ": " ", - 0: ":zero:", - 1: ":one:", - 2: ":two:", - 3: ":three:", - 4: ":four:", - 5: ":five:", - 6: ":six:", - 7: ":seven:", - 8: ":eight:", - 9: ":nine:", - "!": ":grey_exclamation:", - "?": ":grey_question:", - "#": ":hash:", - "*": ":asterisk:", - }; - "abcdefghijklmnopqrstuvwxyz".split("").forEach(c => { - mapping[c] = mapping[c.toUpperCase()] = ` :regional_indicator_${c}:`; - }); - interaction.followUp( - args[1] - .split("") - .map(c => mapping[c] || c) - .join("") - ); - } else if (args[0] === "pp") { - const { user } = - interaction.guild.members.cache.get(args[1]) || interaction.member; - const embed = new MessageEmbed() - .addField( - `${user.username}'s peepee`, - `8${"=".repeat(Math.floor(Math.random() * 20))}D` - ) - .setColor(client.color) - .setTitle("Peepee size machine") - .setTimestamp() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - interaction.followUp({ - embeds: [embed], - }); - } - }, -}; diff --git a/unused/commands/Fun/hack.js b/unused/commands/Fun/hack.js @@ -1,138 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "hack", - description: "Hack a user", - usage: "(User)", - category: "Fun", - options: [ - { - type: 6, - name: "user", - description: "The user you want to hack", - required: true, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args, utils) => { - const answers = [ - "@yousuck.noob", - "@hesnoob.haha", - "@thisguy.suck", - "@paypal.removed", - "@noob.haha", - "@hacked.xyz", - "@susmate.com", - "@gmail.sus", - "@why-im.withyou", - "@someone-end.me", - "@isnoob.io", - "@username-is.noob", - "@hahaget.lost", - "@yahoo.sus", - "@botmail.zip", - "@gmail.com", - "@yahoo.com", - ]; - const passwords = [ - "Disb****", - "disc******", - "pass**********", - "get****", - "mails***", - "endm****", - "gamer***********", - "asegeio*********", - "whys*******", - "Brot******", - "imwith*******", - "luckyyougotthispasswordlolnocencor", - "starb*******", - "egghunt2***", - "secr*****", - ]; - const ips = [ - "10.313.523.502.00.1", - "25.537.753.462.29.2", - "21.175.866.974.07.08", - "32.653.587.825.35.5", - "12.172.764.781.22.8", - "91.723.242.452.09.3", - "92.743.116.896.85.6", - "84.091.000.853.54.7", - "51.071.124.129.12.0", - ]; - const answer = answers[Math.floor(Math.random() * answers.length)]; - const passwrd = passwords[Math.floor(Math.random() * passwords.length)]; - const ip = ips[Math.floor(Math.random() * ips.length)]; - const taggedUser = interaction.guild.members.cache.get(args[0]); - await interaction.deleteReply(); - interaction.channel - .send(`Hacking ${taggedUser.user.username}...`) - .then(async msg => { - utils.sleep(100); - msg.edit("Status: ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 0%"); - utils.sleep(100); - msg.edit("Status: ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 7%: Hacking Email..."); - utils.sleep(600); - msg.edit( - `Status: ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 8%:\n \`Email: ${taggedUser.user.username}@yousuck.noob\`\n \`Password: ${passwrd}\` ` - ); - utils.sleep(600); - msg.edit("Status: ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 9%: Logging in to the Email..."); - utils.sleep(2000); - msg.edit("Status: ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 12%: Turning off the antivirus"); - utils.sleep(1000); - msg.edit("Status: ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 14%: Downloading SYNAPSE X"); - utils.sleep(100); - msg.edit("Status: ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 17%: Deleting Captcha..."); - utils.sleep(100); - msg.edit("Status: ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 20%: Deleting Paypal account..."); - utils.sleep(10); - msg.edit("Status: ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 21%"); - utils.sleep(12); - msg.edit("Status: ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–” 22%"); - utils.sleep(100); - msg.edit("Status: ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 24%: Paypal account deleted"); - utils.sleep(1000); - msg.edit("Status: ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 29%: Hacking is almost ready..."); - utils.sleep(80); - msg.edit("Status: ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–”ā–” 31%"); - utils.sleep(80); - msg.edit("Status: ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–” 36%"); - utils.sleep(40); - msg.edit("Status: ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 41%"); - utils.sleep(60); - msg.edit("Status: ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–”ā–” 47%"); - utils.sleep(50); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–” 53%"); - utils.sleep(3000); - msg.edit( - `Status: ā– ā– ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–” 58%: Email password changed so ${taggedUser.user.username} can not login` - ); - utils.sleep(500); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–” 66%"); - utils.sleep(60); - msg.edit("Status: ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 74%"); - utils.sleep(20); - msg.edit(`Status: ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–”ā–”ā–” 79%: IP address found: ${ip}`); - utils.sleep(83); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā–”ā–”ā–”ā–” 80%"); - utils.sleep(50); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā– ā–”ā–”ā–” 85%"); - utils.sleep(14); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā– ā– ā– ā–”ā–” 93%"); - utils.sleep(70); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā– ā– ā– ā– ā–” 97%"); - utils.sleep(90); - msg.edit("Status: ā– ā– ā– ā– ā– ā– ā– ā– ā– ā– ā–  100%"); - const embed = new MessageEmbed() - .setDescription(`${taggedUser} has been hacked!`) - .addField("Email", `${taggedUser.user.username}${answer}`) - .addField("Password", `${passwrd}`) - .addField("IP address", `${ip}`) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setColor(client.color); - await msg.edit({ embeds: [embed] }); - }); - }, -}; diff --git a/unused/commands/Fun/hug.js b/unused/commands/Fun/hug.js @@ -1,43 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "hug", - description: "Hug someone", - category: "Fun", - usage: "(User)", - options: [ - { - type: 6, - name: "user", - description: "The user you want to hug", - required: true, - }, - { - type: 3, - name: "words", - description: "The words you want to say", - required: false, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const user = interaction.guild.members.cache.get(args[0]); - words = args[1]; - if (user.id === interaction.user.id) { - return interaction.followUp("You can't hug yourself"); - } - const embed = new MessageEmbed() - .setDescription(`${interaction.user} **hugs** ${user}`) - .setImage( - `https://media.tenor.com/images/ca88f916b116711c60bb23b8eb608694/tenor.gif` - ) - .setColor(client.color) - .setTimestamp() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - if (words) { - embed.addField("Words:", words); - } - await interaction - .followUp({ embeds: [embed] }) - .then(msg => msg.react("šŸ’•")); - }, -}; diff --git a/unused/commands/Fun/image.js b/unused/commands/Fun/image.js @@ -1,63 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const { getreddit } = require("cath"); -module.exports = { - name: "image", - description: "Generate images", - options: [ - { - type: "SUB_COMMAND", - name: "meme", - description: "Get a meme from reddit", - }, - { - type: "SUB_COMMAND", - name: "cat", - description: "Get a cat from reddit", - }, - ], - run: async (client, interaction, args) => { - if (args[0] == "meme") { - const subreddits = ["comedyheaven", "dank", "meme", "memes"]; - const subreddit = - subreddits[Math.floor(Math.random() * subreddits.length)]; - const data = await getreddit(subreddit); - interaction.followUp({ - embeds: [ - new MessageEmbed({ - title: data.title, - url: data.url, - image: { url: data.image }, - timestamp: Date.now(), - footer: { text: data.footer }, - color: client.color, - author: { - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }), - }, - }), - ], - }); - } else if (args[0] === "cat") { - const subreddits = ["cat", "cats"]; - const subreddit = - subreddits[Math.floor(Math.random() * subreddits.length)]; - const data = await getreddit(subreddit); - interaction.followUp({ - embeds: [ - new MessageEmbed({ - title: data.title, - url: data.url, - image: { url: data.image }, - timestamp: Date.now(), - footer: { text: data.footer }, - color: client.color, - author: { - name: interaction.user.tag, - iconURL: interaction.user.displayAvatarURL({ dynamic: true }), - }, - }), - ], - }); - } - }, -}; diff --git a/unused/commands/Fun/kiss.js b/unused/commands/Fun/kiss.js @@ -1,43 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "kiss", - description: "Kiss someone", - category: "Fun", - usage: "(User)", - options: [ - { - type: 6, - name: "user", - description: "The user you want to kiss", - required: true, - }, - { - type: 3, - name: "words", - description: "The words you want to say", - required: false, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const user = interaction.guild.members.cache.get(args[0]); - words = args[1]; - if (user.id === interaction.user.id) { - return interaction.followUp("You can't kiss yourself"); - } - const embed = new MessageEmbed() - .setDescription(`${interaction.user} **kisses** ${user}`) - .setImage( - `https://media.discordapp.net/attachments/814310468906123274/817656819416825896/image0.gif` - ) - .setColor(client.color) - .setTimestamp() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - if (words) { - embed.addField("Words:", words); - } - await interaction - .followUp({ embeds: [embed] }) - .then(msg => msg.react("šŸ’•")); - }, -}; diff --git a/unused/commands/Fun/messageinfo.js b/unused/commands/Fun/messageinfo.js @@ -1,41 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "messageinfo", - category: "Information", - type: "CHAT_INPUT", - description: "Check the info of a message", - options: [ - { - type: 3, - name: "message", - description: "The message you want to see", - required: true, - }, - ], - run: async (client, interaction, args) => { - try { - await interaction.channel.messages.fetch(args[0]).catch(() => { - interaction.followUp({ - content: "Message not found in this channel..", - }); - }); - const msg = await interaction.channel.messages.cache.get(args[0]); - const hasImage = msg.attachments.size && msg.attachments.first().width; - const embed = new MessageEmbed() - .setColor(msg.member ? msg.member.displayHexColor : client.color) - .setImage(hasImage ? msg.attachments.first().url : null) - .setAuthor( - msg.author.tag, - msg.author.displayAvatarURL({ format: "png", dynamic: true }) - ) - .addField("Content", msg.content || "No content") - .setTimestamp(msg.createdAt) - .addField("ID", msg.id) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .addField("Jump", `[Click Here to Jump](${msg.url})`); - return interaction.followUp({ embeds: [embed] }); - } catch (err) { - console.log(err); - } - }, -}; diff --git a/unused/commands/Fun/obama.js b/unused/commands/Fun/obama.js @@ -1,45 +0,0 @@ -const o = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā”æā Ÿā ›ā ›ā ›ā ‰ā ‰ā ‰ā ‹ā ›ā ›ā ›ā »ā¢»ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const b = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā”Ÿā ›ā ‰ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ‰ā ™ā »ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const a = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā Ÿā ‹ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ˆā æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const m = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā”æā ā „ā „ā „ā „ā „ā „ā „ā ‚ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ˆā ¹ā£æā£æā£æā£æā£æā£æā£æ"; -const a2 = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā ›ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā  ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ˜ā¢»ā£æā£æā£æā£æā£æ"; -const aa = "ā£æā£æā£æā£æā£æā£æā£æā£æā ƒā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā¢€ā „ā¢ ā „ā „ā”€ā „ā „ā¢€ā ‚ā „ā „ā „ā „ā „ā „ā „ā „ā „ā”ā „ā „ā¢›ā£æā£æā£æā£æ"; -const ab = "ā£æā£æā£æā£æā£æā£æā£æā”‡ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ā”ˆā¢”ā øā£ā¢•ā¢•ā¢µā¢°ā¢±ā¢°ā¢ā¢¤ā””ā”¢ā£•ā¢„ā¢¢ā¢ ā „ā „ā „ā „ā „ā „ā ™ā£æā£æā£æ"; -const ac = "ā£æā£æā£æā£æā£æā£æā£æā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā”ā ‚ā …ā¢•ā Œā”Žā”Žā£Žā¢Žā¢®ā¢®ā£³ā”³ā£ā¢®ā¢ŗā¢œā¢•ā¢•ā¢ā¢Žā Ŗā”ā „ā ā „ā øā£æā£æ"; -const ad = "ā£æā£æā£æā£æā£æā£æā ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ā „ā „ā¢…ā £ā””ā”£ā££ā”³ā”µā£ā”®ā£—ā£—ā”Æā£—ā£Ÿā”®ā”®ā£³ā££ā£³ā¢±ā¢±ā ±ā£ā „ā ‚ā „ā¢æā£æ"; -const ae = "ā£æā£æā£æā£æā£æā£æā „ā „ā „ā „ā „ā „ā „ā ‚ā „ā „ā „ā „ā „ā „ā¢‚ā¢ˆā ¢ā”±ā”±ā”ā£®ā£æā£Ÿā£æā£½ā£·ā£æā£Æā£æā£·ā£æā£æā£æā£¾ā£Æā£—ā”•ā”‡ā”‡ā „ā ‚ā”€ā¢¹ā£æ"; -const af = "ā£æā£æā£æā£æā£æā”Ÿā „ā „ā „ā „ā „ā „ā ‚ā „ā „ā „ā „ā „ā „ā ā¢€ā¢‚ā¢•ā¢øā¢Øā¢Ŗā¢³ā”«ā£Ÿā£æā£»ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā”ŗā”®ā”£ā”£ā  ā¢‚ā ’ā¢øā£æ"; -const ag = "ā£æā£æā£æā£æā£æā”‡ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā  ā ā „ā”‚ā †ā”‡ā£—ā£ā¢®ā¢¾ā£»ā£žā£æā£æā£æā£æā£æā£æā£æā£æā¢æā£½ā£Æā”Æā£ŗā¢øā¢˜ā Øā ”ā”…ā¢Øā£æ"; -const ah = "ā£æā£æā ‹ā ‰ā ™ā ƒā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ā „ā „ā „ā”‚ā”Ŗā”Ŗā”Ŗā”®ā”®ā”Æā£»ā£½ā£¾ā£æā£æā£æā£Ÿā£æā£æā£æā£½ā£æā£æā”Æā£Æā”ŗā”øā”°ā”±ā¢ā”…ā£¼ā£æ"; -const ai = "ā£æā ”ā”€ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā  ā ˆā †ā ±ā ‘ā ā œā •ā”ā”ā£žā¢Æā¢æā£æā£æā”æā£Ÿā£æā£æā£æā”æā”æā£½ā£·ā£½ā”øā”Øā”Ŗā£‚ā Šā£æā£æ"; -const aj = "ā£æā ”ā „ā”Øā£¢ā ā ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ā ā”“ā£—ā”½ā£ā ½ā ā …ā ‘ā ā ‰ā ˜ā ˜ā ˜ā µā”‘ā¢œā¢€ā¢€ā¢‰ā¢½"; -const ak = "ā£æā ā  ā¢±ā¢˜ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ˆā ˆā ±ā£ā œā”˜ā Œā „ā „ā”Ŗā£³ā£Ÿā”®ā¢…ā ¤ā  ā „ā „ā£€ā£€ā”€ā”€ā „ā ˆā”‚ā¢²ā”Ŗā” ā£æ"; -const al = "ā£æā”‡ā Øā£ŗā¢ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā”€ā „ā „ā „ā ¤ā” ā”¢ā¢’ā ¦ā  ā „ā „ā „ā”øā¢½ā£Ÿā¢®ā ¢ā”‚ā”ā „ā”ˆā”€ā ¤ā”€ā „ā ‘ā¢„ā Øā¢øā”ŗā£ā£æ"; -const am = "ā£æā£æā ˆā •ā ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā”‚ā”Ŗā”ā”„ā¢¤ā£°ā£°ā£°ā”“ā”®ā ¢ā ‚ā „ā „ā”Šā¢®ā¢ŗā¢•ā¢µā¢„ā”¬ā£Œā£’ā”šā£”ā¢šā¢Œā¢Øā¢šā Œā£¾ā”Ŗā£¾ā£æ"; -const an = "ā£æā£æā£†ā „ā”€ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā”‘ā¢•ā¢•ā”Æā”·ā£•ā¢§ā¢“ā¢­ā Øā”€ā „ā”‚ā Øā”Øā£Ŗā”³ā£ā¢ā”½ā£»ā£»ā£žā¢½ā£²ā¢³ā¢±ā¢”ā ±ā Øā£Ÿā¢ŗā£æā£æ"; -const ao = "ā£æā£æā£æā”†ā „ā”…ā ‡ā”„ā „ā „ā „ā „ā „ā „ā „ā ā Øā¢Ŗā¢¹ā¢½ā¢½ā£ŗā¢ā ‰ā ā ā „ā „ā „ā¢Œā¢Žā”–ā”Æā”Žā”—ā¢ā œā£¶ā£Æā£»ā¢®ā”»ā£Ÿā£³ā”•ā …ā£·ā£æā£æā£æ"; -const ap = "ā£æā£æā£æā£æā£¶ā£¶ā£æā£·ā „ā „ā „ā „ā „ā „ā „ā „ā ˆā ”ā”‘ā •ā ā „ā”€ā „ā „ā Šā¢†ā ‚ā Øā”Ŗā£ŗā£®ā£æā”¾ā”œā£œā”œā£„ā ™ā¢žā£æā¢æā”æā£—ā¢ā¢øā£¾ā£æā£æā£æ"; -const aq = "ā£æā£æā£æā£æā£æā£æā£æā£æā „ā „ā „ā „ā „ā”€ā „ā „ā „ā „ā¢€ā „ā  ā „ā  ā „ā „ā „ā „ā „ā „ā Šā ŗā”¹ā ³ā”™ā”œā”“ā”­ā”ŗā”€ā „ā £ā”»ā”¹ā”øā Øā££ā£æā£æā£æā£æ"; -const ar = "ā£æā£æā£æā£æā£æā£æā£æā£æā „ā „ā „ā „ā „ā  ā „ā „ā£‚ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā¢„ā ¤ā”¤ā”„ā”†ā”Æā”¢ā”£ā”£ā”“ā¢•ā ½ā£„ā „ā Øā”‚ā¢Œā£¼ā£æā£æā£æā£æā£æ"; -const a_ = "ā£æā£æā£æā£æā£æā£æā£æā£æā”†ā „ā „ā „ā „ā ˆā †ā „ā øā”‚ā „ā „ā „ā¢€ā „ā¢€ā ˆā „ā ‚ā ā ™ā ā ¼ā ­ā £ā £ā £ā ‘ā Œā ¢ā £ā”£ā” ā”˜ā£°ā£±ā£æā£æā£æā£æā£æā£æ"; -const at = "ā£æā£æā£æā£æā£æā£æā£æā£æā”‡ā „ā „ā „ā „ā „ā¢‘ā „ā ˆā”±ā „ā¢˜ā „ā”€ā Øā¢ā£§ā£³ā£·ā£¶ā£¦ā£¤ā£“ā£¶ā£¶ā£¶ā”¶ā „ā” ā”¢ā”•ā£œā Žā”®ā££ā£æā£æā£æā£æā£æā£æā£æ"; -const au = "ā£æā£æā£æā£æā£æā£æā£æā£æā”‡ā „ā „ā „ā „ā „ā „ā ¢ā „ā Øā „ā „ā £ā”€ā „ā¢€ā¢€ā¢™ā ƒā”æā¢æā æā”æā”æā¢Ÿā¢‹ā¢”ā”±ā£ā¢œā”œā”Ŗā”Ŗā£µā£æā£æā£æā£æā£æā£æā£æā£æ"; -const av = "ā£æā£æā£æā£æā£æā£æā£æā£æā”ā „ā „ā „ā „ā „ā „ā „ā …ā „ā ”ā „ā „ā ”ā¢€ā¢‚ā ¢ā””ā ”ā £ā”‘ā£ā¢Æā”»ā”³ā£¹ā”ŗā”Ŗā¢Žā Žā”†ā¢£ā£¾ā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const aw = "ā£æā£æā£æā£æā£æā£æā£æā£æā£‡ā „ā „ā „ā „ā „ā „ā „ā ā „ā „ā ā „ā¢ˆā „ā¢‚ā •ā”•ā”ā¢•ā¢Žā¢Žā¢®ā¢Žā¢Æā¢ŗā¢øā¢¬ā £ā¢ƒā£¼ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const ax = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£§ā”€ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā  ā Øā”ā Œā¢†ā¢‡ā¢§ā¢­ā££ā”³ā£µā¢«ā£³ā¢±ā ±ā¢‘ā£¾ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const ay = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£·ā£†ā „ā „ā „ā „ā „ā „ā „ā „ā „ā „ā ā”Šā¢Œā¢¢ā¢”ā¢£ā¢Ŗā”ŗā”Ŗā”Žā”Žā”Žā”šā£Øā£¾ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const az = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£·ā£„ā”€ā „ā „ā „ā „ā „ā „ā „ā „ā „ā •ā”…ā¢—ā¢•ā”³ā”­ā£³ā¢•ā •ā”±ā£¼ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const ba = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£¦ā”€ā „ā „ā „ā „ā „ā „ā „ā „ā „ā Œā „ā ‘ā ©ā¢ˆā¢‚ā£±ā£¾ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const bb = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£¶ā”€ā¢„ā „ā£€ā „ā”€ā£€ā¢ ā¢„ā£–ā£–ā£žā£¼ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; -const bc = "ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£§ā£±ā”ā”•ā”•ā”½ā£ā£Ÿā£®ā£¾ā£¾ā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æā£æ"; - -module.exports = { - name: "obama", - category: "Utilities", - description: "Obama", - run: async (client, interaction, args) => { - interaction.followUp({ - content: `${o}\n${b}\n${a}\n${m}\n${a2}\n${aa}\n${ab}\n${ac}\n${ad}\n${ae}\n${af}\n${ag}\n${ah}\n${ai}\n${aj}\n${ak}\n${al}\n${am}\n${an}\n${ao}\n${ap}\n${aq}\n${ar}\n${a_}\n${at}\n${au}\n${av}\n${aw}\n${ax}\n${ay}\n${az}\n${ba}\n${bb}\n${bc}`, - }); - }, -}; diff --git a/unused/commands/Fun/quote.js b/unused/commands/Fun/quote.js @@ -1,42 +0,0 @@ -const { - Client, - Message, - MessageEmbed, - MessageAttachment, -} = require("discord.js"); -// const { Canvas } = require("canvacord"); -module.exports = { - name: "quote", - description: "Quote a message", - usage: "{User} (Message)", - category: "Fun", - run: async (client, message, args) => { - const member = message.mentions.users.first() || message.author; - if (message.mentions.users.first()) { - const imgae = await Canvas.quote({ - image: member.displayAvatarURL({ - format: "png", - }), - message: args.slice(1).join(" "), - username: member.displayName ? member.displayName : member.username, - color: "ffffff", - }); - const attach = new MessageAttachment(imgae, "quote.png"); - message.reply(attach); - } - else { - const imgae = await Canvas.quote({ - image: message.author.displayAvatarURL({ - format: "png", - }), - message: args.join(" "), - username: message.member.nickname - ? message.member.nickname - : member.username, - color: "ffffff", - }); - const attach = new MessageAttachment(imgae, "quote.png"); - message.reply(attach); - } - }, -}; diff --git a/unused/commands/Fun/roleinfo.js b/unused/commands/Fun/roleinfo.js @@ -1,85 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const moment = require("moment"); -module.exports = { - name: "roleinfo", - description: "Get information of a role", - category: "Infromation", - options: [ - { - name: "role", - type: "ROLE", - description: "The role you want to see", - required: true, - }, - ], - type: "CHAT_INPUT", - /** - * - * @param {Client} client - * @param {CommandInteracion} interaction - * @param {String[]} args - */ - run: async (client, interaction, args, utils) => { - const role = interaction.guild.roles.cache.get(args[0]); - const position = `\`${ - interaction.guild.roles.cache.size - role.position - }\`/\`${interaction.guild.roles.cache.size}\``; - const embed = new MessageEmbed() - .setTimestamp() - .setURL(client.web) - .setAuthor( - interaction.member.displayName, - interaction.user.displayAvatarURL({ dynamic: true }) - ) - .setTitle("Role Info") - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setColor(role.color) - .addFields( - { - name: "ID", - value: role.id, - }, - { - name: "Name", - value: role.name, - inline: true, - }, - { - name: "Color", - value: role.hexColor, - inline: true, - }, - { - name: "Position", - value: position, - inline: true, - }, - { - name: `Hoisted`, - value: `${role.hoist ? "Yes" : "No"}`, - inline: true, - }, - { - name: "Mentionable", - value: `${role.mentionable ? "Yes" : "No"}`, - inline: true, - }, - { - name: "Bot Role", - value: `${role.managed ? "Yes" : "No"}`, - inline: true, - }, - { - name: "Creation Date", - value: `\`${moment(role.createdAt).format("DD/MMM/YYYY")}\``, - inline: true, - }, - { - name: "Permissions", - value: utils.fixPermissions(role.permissions.toArray()), - inline: true, - } - ); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/unused/commands/Fun/rps.js b/unused/commands/Fun/rps.js @@ -1,223 +0,0 @@ -const Discord = require("discord.js"); - -module.exports = { - name: "rockpaperscissors", - description: "Play RPS with someone", - usage: "(User)", - category: "Fun", - options: [ - { - type: 6, - name: "user", - description: "The user you want to play with", - required: true, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args, utils) => { - const user = interaction.guild.members.cache.get(args[0]); - if (user.user.id == interaction.user.id) { - return interaction.followUp("You can't play with yourself"); - } - if (user.user.bot) return interaction.followUp("You can't play with bots"); - - const embed = new Discord.MessageEmbed() - .setDescription(`Wait for **${user.user.username}** to accept your game`) - .setColor(client.color) - .setTimestamp() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - - const confirm = new Discord.MessageActionRow().addComponents( - new Discord.MessageButton() - .setLabel("Accept") - .setStyle("SUCCESS") - .setCustomId("accept") - .setEmoji("808683134786863124"), - new Discord.MessageButton() - .setLabel("Decline") - .setStyle("DANGER") - .setCustomId("decline") - .setEmoji("808683573544353792") - ); - await interaction - .followUp({ - content: `<@!${user.user.id}>`, - embeds: [embed], - components: [confirm], - }) - .then(async m => { - const filter = button => button.user.id == user.user.id; - const collector = m.createMessageComponentCollector({ - filter, - type: "BUTTON", - time: 60000, - }); - collector.on("collect", button => { - if (button.customId == "decline") { - button.deferUpdate(); - return collector.stop("decline"); - } - button.deferUpdate(); - const pick = new Discord.MessageEmbed() - .setTitle(`${interaction.user.username} VS ${user.user.username}`) - .setColor(client.color) - .setDescription("Choose either šŸŖØ, šŸ“„, or āœ‚ļø") - .setTimestamp(); - const choices = new Discord.MessageActionRow().addComponents( - new Discord.MessageButton() - .setCustomId("rock") - .setStyle("SECONDARY") - .setEmoji("šŸŖØ"), - new Discord.MessageButton() - .setCustomId("paper") - .setStyle("SECONDARY") - .setEmoji("šŸ“„"), - new Discord.MessageButton() - .setCustomId("scissors") - .setStyle("SECONDARY") - .setEmoji("āœ‚ļø") - ); - m.edit({ - embeds: [pick], - components: [choices], - }); - collector.stop(); - const users = new Set(); - users.add(interaction.user.id); - users.add(user.user.id); - let ping, pong; - const filter = b => users.has(b.user.id); - const collect = m.createMessageComponentCollector({ - filter, - type: "BUTTON", - time: 60000, - }); - collect.on("collect", async b => { - users.delete(b.user.id); - if (b.user.id == user.user.id) { - ping = b.customId; - await b.reply({ - content: `You have choosen **${utils.format(ping)}**`, - ephemeral: true, - }); - } - if (b.user.id == interaction.user.id) { - pong = b.customId; - await b.reply({ - content: `You have choosen **${utils.format(pong)}**`, - ephemeral: true, - }); - } - if (users.size == 0) return collect.stop(); - }); - collect.on("end", (c, reason) => { - if (reason == "time") { - const timeout = new Discord.MessageEmbed() - .setTitle("Timeout") - .setColor("RED") - .setDescription( - "Game cancelled since a player didn't react in time" - ); - m.edit({ - embeds: [timeout], - }); - } else { - const sit1 = ping == "rock" && pong == "scissors"; - const sit2 = ping == "scissors" && pong == "rock"; - const sit3 = ping == "scissors" && pong == "paper"; - const sit4 = ping == "paper" && pong == "scissors"; - const sit5 = ping == "paper" && pong == "rock"; - const sit6 = ping == "rock" && pong == "paper"; - if (sit1 || sit3 || sit5) { - const embed = new Discord.MessageEmbed() - .setTitle(`${user.user.username} wins!`) - .setColor("GREEN") - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .addField( - `${user.user.username} choice`, - `${utils.format(ping)}` - ) - .addField( - `${interaction.user.username} choice`, - `${utils.format(pong)}` - ) - .setTimestamp(); - m.edit({ - embeds: [embed], - components: [], - }); - } else if (sit2 || sit4 || sit6) { - const embed = new Discord.MessageEmbed() - .setTitle(`${interaction.user.username} wins!`) - .setColor("GREEN") - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .addField( - `${interaction.user.username} choice`, - `${utils.format(pong)}` - ) - .addField( - `${user.user.username} choice`, - `${utils.format(ping)}` - ) - .setTimestamp(); - m.edit({ - embeds: [embed], - components: [], - }); - } else { - const embed = new Discord.MessageEmbed() - .setTitle(`Tie!`) - .setColor("GREY") - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ) - .addField( - `${interaction.user.username} choice`, - `${utils.format(pong)}` - ) - .addField( - `${user.user.username} choice`, - `${utils.format(ping)}` - ) - .setTimestamp(); - m.edit({ embeds: [embed], components: [] }); - } - } - }); - }); - collector.on("end", (collected, reason) => { - if (reason == "time") { - const embed = new Discord.MessageEmbed() - .setTitle("Timeout") - .setColor("RED") - .setDescription( - `**${user.user.username}** did not confirm before 60 seconds of time` - ); - m.edit({ - embeds: [embed], - components: [], - }); - } - if (reason == "decline") { - const embed = new Discord.MessageEmbed() - .setTitle("Declined") - .setColor("RED") - .setDescription( - `**${user.user.username}** has declined your game of RPS` - ); - m.edit({ - embeds: [embed], - components: [], - }); - } - }); - }); - }, -}; diff --git a/unused/commands/Fun/sr.js b/unused/commands/Fun/sr.js @@ -1,29 +0,0 @@ -const axios = require("axios"); - -module.exports = { - name: "superscript", - description: "Superscript your text", - usage: "(text)", - category: "Fun", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "text", - description: "The text you want to convert", - required: true, - }, - ], - run: async (client, interaction, args) => { - const text = args[0]; - if (text.includes("@")) { - return interaction.followUp({ - content: "Text cannot includes '@'", - }); - } - const data = await axios - .get(`${process.env.api}/api/v1/fun/superscript?text=${text}`) - .then(res => res.data.text); - interaction.followUp({ content: data }); - }, -}; diff --git a/unused/commands/Fun/topic.js b/unused/commands/Fun/topic.js @@ -1,18 +0,0 @@ -const topics = require("../../../util/Data/topics.json"); -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "topic", - description: "Generate topics", - run: async (client, interaction, args) => { - const embed = new MessageEmbed() - .setTitle(`${interaction.user.username} picked a topic`) - .setDescription(`${topics[Math.floor(Math.random() * topics.length)]}`) - .setColor(client.color) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setThumbnail( - "https://media.discordapp.net/attachments/896078559293104128/896392631565828146/nyx_logo_transparent.webp" - ); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/unused/commands/Fun/topics.json b/unused/commands/Fun/topics.json @@ -1,31 +0,0 @@ -[ - "If you could be best friends with any person in the world, who would it be?", - "How can governments make education more efficient?", - "What is something you enjoy enjoy or like about discord?", - "Do you play any sports?", - "What are your plans for the weekend?", - "What kind of music are you into?", - "What music did you like when you were younger?", - "Whatā€™s your favorite movie?", - "Whoā€™s your favorite actor / actress / director?", - "Do you like cooking?", - "Do you like reading books?", - "Are there any books you would really recommend I read?", - "Where do you wish you could go?", - "Whatā€™s your favorite place youā€™ve been?", - "What hobbies did you have when you were younger?", - "What pet would you like to have?", - "What current trend is going to look the silliest in 10 years?", - "What subjects were hardest for you in school?", - "Whatā€™s your favorite app on your phone?", - "What app would you suggest everyone get?", - "Whatā€™s your favorite season? And why?", - "What is the longest youā€™ve been offline?", - "What's your opinion on console or PC games?", - "Do you think that VR will become mainstream in the near future?", - "What is that myth that you grew up knowing but found out recently that is a lie?", - "If you had to erase a movie from your mind, which one would it be?", - "Have you ever wished you were born on another planet?", - "What makes someone a good person?", - "What qualities do you look for in a friend?" -] -\ No newline at end of file diff --git a/unused/commands/Fun/triggered.js b/unused/commands/Fun/triggered.js @@ -1,25 +0,0 @@ -// const { Canvas } = require("canvacord"); -const { MessageAttachment } = require("discord.js"); -module.exports = { - name: "triggered", - usage: "{User}", - description: "Have a trigger effect on a user's avatar", - category: "Fun", - options: [ - { - type: 6, - name: "user", - description: "The user you want to use the effect", - required: true, - }, - ], - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const user = interaction.guild.members.cache.get(args[0]); - const ava = user.user.displayAvatarURL({ format: "png", size: 2048 }); - const imga = await Canvas.trigger(ava); - interaction.followUp({ - files: [new MessageAttachment(imga, "image.gif")], - }); - }, -}; diff --git a/unused/commands/Giveaway/giveaway.js b/unused/commands/Giveaway/giveaway.js @@ -1,144 +0,0 @@ -const GiveawaysClient = require("../../../client/GiveawaysClient"); -module.exports = { - name: "giveaway", - description: "Giveaway", - UserPerms: ["MANAGE_MESSAGES"], - options: [ - { - type: "SUB_COMMAND", - name: "start", - description: "Start a giveaway", - options: [ - { - type: 3, - name: "prize", - description: "The prize of the giveaway", - required: true, - choices: [], - }, - { - type: 4, - name: "winners", - description: "The amount of winners of the giveaway", - required: true, - }, - { - type: 3, - name: "time", - description: "The amount of time of the giveaway", - required: true, - }, - { - type: 7, - name: "channel", - description: "The channel of the giveaway", - required: true, - channelTypes: ["GUILD_TEXT"], - }, - { - type: 8, - name: "role1", - description: "The required role to join the giveaway", - }, - { - type: 8, - name: "role2", - description: "The required role to join the giveaway", - }, - { - type: 8, - name: "role3", - description: "The required role to join the giveaway", - }, - ], - }, - { - type: "SUB_COMMAND", - name: "reroll", - description: "Reroll a giveaway", - options: [ - { - type: 3, - name: "message", - description: "The message ID of the giveaway", - required: true, - choices: [], - }, - ], - }, - { - type: "SUB_COMMAND", - name: "end", - description: "End a giveaway", - options: [ - { - type: 3, - name: "message", - description: "The message ID of the giveaway", - required: true, - choices: [], - }, - ], - }, - ], - run: async (client, interaction, args, utils) => { - if (args[0] == "start") { - const [, prize, winners, time, channel, roles1, roles2, roles3] = args; - if (!utils.ms(time)) { - interaction.followUp({ - content: "Time must be a valid time to parse (Example: 10m, 100s)", - }); - } - await GiveawaysClient.create(client, { - prize, - host: interaction.user.id, - winners, - endAfter: time, - requirements: roles1 - ? { - Enabled: true, - Roles: [roles1], - } - : roles2 && roles1 - ? { - Enabled: true, - Roles: [roles1, roles2], - } - : roles1 && roles2 && roles3 - ? { - Enabled: true, - Roles: [roles1, roles2, roles3], - } - : { Enabled: false }, - Channel: channel, - }); - interaction.followUp({ - content: `Giveaway is started in ${interaction.guild.channels.cache.get( - channel - )}`, - }); - } else if (args[0] == "reroll") { - const giveaway = await GiveawaysClient.getByMessage(args[1]); - const m = await client.guilds.cache - .get(giveaway.Guild) - .channels.cache.get(giveaway.Channel) - .messages.fetch(args[1]); - if (!m) { - interaction.followUp({ content: "Unable to find the giveaway āš " }); - } else { - await GiveawaysClient.end(m, giveaway, m); - } - } else { - const giveaway = await GiveawaysClient.getByMessage(args[1]); - const m = await client.guilds.cache - .get(giveaway.Guild) - .channels.cache.get(giveaway.Channel) - .messages.fetch(args[1]); - if (!m) { - interaction.followUp({ content: "Unable to find the giveaway āš " }); - } else { - await GiveawaysClient.end(m, giveaway, m); - } - } - }, -}; diff --git a/unused/commands/Information/banner.js b/unused/commands/Information/banner.js @@ -1,52 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "banner", - description: "Show user's banner", - type: "CHAT_INPUT", - usage: "{User}", - category: "Information", - options: [ - { - type: 6, - name: "user", - description: "The user you want to see", - required: false, - }, - ], - run: async (client, interaction, args) => { - const { user } = - interaction.guild.members.cache.get(args[0]) || interaction.member; - const data = await user.fetch(); - if (data?.banner) { - const extension = data.banner.startsWith("a_") ? ".gif" : ".png"; - const url = `https://cdn.discordapp.com/banners/${user.id}/${data.banner}${extension}?size=2048`; - - const embed = new MessageEmbed() - .setDescription(`[Link to Banner](${url})`) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setTitle(`${user.tag}'s Banner`) - .setImage(url) - .setColor(data?.hexAccentColor || client.color); - interaction.followUp({ embeds: [embed] }); - } else if (data?.hexAccentColor) { - const embed = new MessageEmbed() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setDescription( - `**${user.tag}** does not have a banner but they have an accent color` - ) - .setColor(data?.hexAccentColor); - interaction.followUp({ embeds: [embed] }); - } else { - const embed = new MessageEmbed() - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setDescription( - `Seems like **${user.username}** doesn't have a banner or an accent color.` - ) - .setColor(client.color); - interaction.followUp({ embeds: [embed] }); - } - }, -}; diff --git a/unused/commands/Information/servericon.js b/unused/commands/Information/servericon.js @@ -1,17 +0,0 @@ -const { MessageEmbed } = require("discord.js"); - -module.exports = { - name: "servericon", - description: "View the icon of the server", - category: "Information", - type: "CHAT_INPUT", - run: async (client, interaction, args) => { - const Embed = new MessageEmbed() - .setTitle(`Icon of ${interaction.guild.name}`) - .setURL(client.web) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setImage(interaction.guild.iconURL({ dynamic: true, size: 2048 })); - interaction.followUp({ embeds: [Embed] }); - }, -}; diff --git a/unused/commands/Information/serverinfo.js b/unused/commands/Information/serverinfo.js @@ -1,185 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const moment = require("moment"); -const filterLevels = { - DISABLED: "Off", - MEMBERS_WITHOUT_ROLES: "No Role", - ALL_MEMBERS: "Everyone", -}; - -const verificationLevels = { - NONE: "None", - LOW: "Low", - MEDIUM: "Medium", - HIGH: "High", - VERY_HIGH: "Very High", -}; - -const regions = { - brazil: "Brazil", - europe: "Europe", - hongkong: "Hong Kong", - india: "India", - japan: "Japan", - russia: "Russia", - singapore: "Singapore", - southafrica: "South Africa", - sydeny: "Sydeny", - "us-central": "US Central", - "us-east": "US East", - "us-west": "US West", - "us-south": "US South", -}; - -module.exports = { - name: "serverinfo", - description: "Check the info of the server", - category: "Information", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "server", - description: "The server you want to see (Paste Server ID)", - required: false, - }, - ], - run: async (client, interaction, args, utils) => { - try { - const g = client.guilds.cache.get(args[0]) || interaction.guild; - const vanityCode = g.vanityURLCode; - let vanityInvite = `https://discord.gg/${vanityCode}`; - if (vanityCode === null) vanityInvite = "No custom URL"; - const members = g.members.cache; - const roles = g.roles.cache - .sort((a, b) => b.position - a.position) - .map(role => role.toString()); - const owner = await g.fetchOwner(); - const voiceChannel = g.channels.cache.filter( - ch => ch.type === "GUILD_VOICE" - ).size; - const textChannel = g.channels.cache.filter( - ch => ch.type === "GUILD_TEXT" - ).size; - const categoryChannel = g.channels.cache.filter( - ch => ch.type === "GUILD_CATEGORY" - ).size; - const embed = new MessageEmbed() - .setTimestamp() - .setTitle("**Server Information**") - .setAuthor(`${g.name}`, g.iconURL({ dynamic: true })) - .setColor(client.color) - .setDescription(g.description || "No Description") - .setThumbnail(g.iconURL({ dynamic: true, size: 1024 })) - .addFields( - { - name: `<:nyx_owner:897418259433943120> Owner Info`, - value: ` - **Owner āÆ** ${owner} - šŸ†” **Owner ID āÆ** \`${owner.id}\` - `, - inline: true, - }, - { - name: `Misc Info`, - value: ` - **šŸ†” Server ID āÆ** \`${g.id}\` - **šŸŒ Region āÆ** ${regions[g.regions]} - **šŸ”— Vanity Link āÆ** [${vanityCode}](${vanityInvite}) - `, - inline: true, - }, - { - name: `<a:nyx_last_update:897381474330873887> Creation Date`, - value: ` - ${moment(g.createdTimestamp).format("LL")} ${moment( - g.createdTimestamp - ).format("LTS")} (${moment(g.createdTimestamp).fromNow()})`, - inline: true, - }, - // Row 2 - { - name: `<:4chanluv:836623612689121320> Emojies ${g.emojis.cache}`, - value: ` - **Static āÆ** ${g.emojis.cache.size.toString()} - **Animated āÆ** ${g.emojis.cache - .filter(emoji => emoji.animated) - .size.toString()}`, - inline: true, - }, - { - name: `Member Statistics`, - value: ` - šŸ‘„ **TotalāÆ** ${g.memberCount.toString()} - šŸš¶ **UsersāÆ** ${members - .filter(member => !member.user.bot) - .size.toString()} - šŸ¤– **BotsāÆ** ${members - .filter(member => member.user.bot) - .size.toString()}`, - inline: true, - }, - { - name: `Channel Info`, - value: ` - šŸ“ **Categories āÆ** ${categoryChannel} - #ļøāƒ£ **TextāÆ** ${textChannel} - šŸ”Š **VoiceāÆ** ${voiceChannel}`, - inline: true, - }, - // Row 3 - { - name: `Server Specification`, - value: ` - **<:partner:840231939944480829> Partnered āÆ** ${ - g.partnered - ? "<a:nyx_checkmark:897240322411724841>" - : "<a:nyx_cross:897244999211696198>" - } - **<:verifiedserver:897410018234728449> Verified āÆ** ${ - g.verified - ? "<a:nyx_checkmark:897240322411724841>" - : "<a:nyx_cross:897244999211696198>" - } - **šŸš„ Verification Level āÆ** ${verificationLevels[g.verificationLevel]} - **šŸ’¢ Explicit Filter āÆ** ${filterLevels[g.explicitContentFilter]} - **Tier āÆ** ${ - g.premiumTier == "TIER_3" - ? "3 <:nyx_tier3:897406181511946261>" - : g.premiumTier == "TIER_2" - ? "2 <:nyx_tier2:897406181541281792>" - : g.premiumTier == "TIER_1" - ? "1 <:nyx_tier1:897406181558067210>" - : "0" - } - **Count āÆ** ${g.premiumSubscriptionCount || "0"}`, - inline: true, - }, - { - name: `<a:nyx_community:897419330478825512> Community Features`, - value: `${ - utils.fixFeatures(g.features) || "No Community Features" - }`, - inline: true, - }, - { - name: `šŸ‘” Role Info [${roles.length}]`, - value: `${ - roles.length < 10 - ? roles.join(" **|** ") - : roles.length > 10 - ? `${roles.slice(0, 10).join(" **|** ")}\n+${ - roles.length - 10 - } roles...` - : "None" - }`, - inline: true, - } - ) - .setURL(vanityCode ? vanityInvite : "https://cath.gq/") - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); - interaction.followUp({ embeds: [embed] }); - } catch (e) { - console.log(e); - } - }, -}; diff --git a/unused/commands/Moderation/announce.js b/unused/commands/Moderation/announce.js @@ -1,63 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "announce", - UserPerms: ["MANAGE_MESSAGES"], - BotPerms: ["MANAGE_MESSAGES"], - usage: "{Channel} (Message)", - description: "Announce a message to a channel.", - category: "Moderation", - options: [ - { - type: 7, - name: "channel", - description: "The channel to announce", - required: true, - channelTypes: ["GUILD_TEXT"], - }, - { - type: 3, - name: "message", - description: "The message to announce", - required: true, - }, - ], - run: async (client, interaction, args) => { - const channel = interaction.guild.channels.cache.get(args[0]); - if (channel.type !== "GUILD_TEXT") { - return interaction.followUp({ - content: "Please provide a text channel", - }); - } - try { - channel.send({ - embeds: [ - new MessageEmbed() - .setAuthor( - `Sent by ${interaction.member.displayName}`, - interaction.user.displayAvatarURL({ dynamic: true }), - ) - .setDescription(args[1]) - .setTimestamp() - .setColor(client.color), - ], - }); - interaction.followUp({ - embeds: [ - new MessageEmbed() - .setTitle(`Message Announced`) - .addField("**Moderator**", interaction.user.tag, true) - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL(), - ) - .setTimestamp() - .setColor(client.color), - ], - }); - } - catch (e) { - console.log(e); - interaction.followUp({ content: `**Error**: ${e.message}` }); - } - }, -}; diff --git a/command/Moderation/ban.js b/unused/commands/Moderation/ban.js diff --git a/command/Moderation/kick.js b/unused/commands/Moderation/kick.js diff --git a/command/Moderation/lock.js b/unused/commands/Moderation/lock.js diff --git a/command/Moderation/mute.js b/unused/commands/Moderation/mute.js diff --git a/command/Moderation/nuke.js b/unused/commands/Moderation/nuke.js diff --git a/unused/commands/Moderation/permission.js b/unused/commands/Moderation/permission.js @@ -1,120 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "permission", - usage: "(User)", - description: "Show user's permission in server/channel", - category: "Utilities", - type: "CHAT_INPUT", - options: [ - { - type: 6, - name: "user", - description: "The use you want to see", - required: false, - }, - ], - run: async (client, interaction, args) => { - const yes = "āœ”ļø"; - const no = "āŒ"; - const x = "```"; - const s = "šŸ“›"; - const c = "ā™Øļø"; - - const permissions = [ - "CREATE_INSTANT_INVITE", - "KICK_MEMBERS", - "BAN_MEMBERS", - "ADMINISTRATOR", - "MANAGE_CHANNELS", - "MANAGE_GUILD", - "ADD_REACTIONS", - "VIEW_AUDIT_LOG", - "PRIORITY_SPEAKER", - "STREAM", - "VIEW_CHANNEL", - "SEND_MESSAGES", - "SEND_TTS_MESSAGES", - "MANAGE_MESSAGES", - "EMBED_LINKS", - "ATTACH_FILES", - "READ_MESSAGE_HISTORY", - "MENTION_EVERYONE", - "USE_EXTERNAL_EMOJIS", - "VIEW_GUILD_INSIGHTS", - "CONNECT", - "SPEAK", - "STREAM", - "MUTE_MEMBERS", - "DEAFEN_MEMBERS", - "MOVE_MEMBERS", - "USE_VAD", - "CHANGE_NICKNAME", - "MANAGE_NICKNAMES", - "MANAGE_ROLES", - "MANAGE_WEBHOOKS", - "MANAGE_EMOJIS_AND_STICKER", - "USE_VAD", - "PRIORITY_SPEAKER", - "REQUEST_TO_SPEAK", - "MANAGE_THREADS", - "USE_PUBLIC_THREADS", - "USE_PRIVATE_THREADS", - "USE_EXTERNAL_STICKERS", - "USE_APPLICATION_COMMANDS", - ]; - - const user = - interaction.guild.members.cache.get(args[0]) || interaction.member; - const userId = user.user.id; - let description = `Server - ${s}\nCurrent channel - ${c}\n\n${s} | ${c}\n`; - const embed = new MessageEmbed() - .setTitle(`${user.user.username} Permissions`) - .setColor(user.displayColor) - .setURL(client.web) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp(); - permissions.forEach(perm => { - description += `${user.permissions.has(perm) ? yes : no} | ${ - interaction.channel.permissionsFor(userId).has(perm) ? yes : no - } - ${perm - .replace("CREATE_INSTANT_INVITE", "Create Invite") - .replace("KICK_MEMBERS", "Kick Members") - .replace("BAN_MEMBERS", "Ban Members") - .replace("ADMINISTRATOR", "Administrator") - .replace("MANAGE_CHANNELS", "Manage Channels") - .replace("MANAGE_GUILD", "Manage Guild") - .replace("ADD_REACTIONS", "Add Reactions") - .replace("VIEW_AUDIT_LOG", "View Audit Log") - .replace("PRIORITY_SPEAKER", "Priority Speaker") - .replace("STREAM", "Video") - .replace("VIEW_CHANNEL", "View Channel") - .replace("SEND_MESSAGES", "Send Messages") - .replace("SEND_TTS_MESSAGES", "Send TTS Messages") - .replace("MANAGE_MESSAGES", "Manage Messages") - .replace("EMBED_LINKS", "Embed Links") - .replace("ATTACH_FILES", "Attach Files") - .replace("READ_MESSAGE_HISTORY", "Read Message History") - .replace("MENTION_EVERYONE", "Mention Everyone") - .replace("USE_EXTERNAL_EMOJIS", "Use External Emojis") - .replace("VIEW_GUILD_INSIGHTS", "View Guild Insights") - .replace("CONNECT", "Connect") - .replace("SPEAK", "Speak") - .replace("MUTE_MEMBERS", "Mute Members") - .replace("DEAFEN_MEMBERS", "Defean Members") - .replace("MOVE_MEMBERS", "Move Members") - .replace("USE_VAD", "Use VAD") - .replace("CHANGE_NICKNAME", "Change Nickname") - .replace("MANAGE_NICKNAMES", "Manage Nicknames") - .replace("MANAGE_ROLES", "Manage Roles") - .replace("MANAGE_WEBHOOKS", "Manage Webhooks") - .replace("MANAGE_EMOJIS_AND_STICKER", "Manage Emojis and Sticker") - .replace("MANAGE_THREADS", "Manage Threads") - .replace("USE_PUBLIC_THREADS", "Use Public Threads") - .replace("USE_PRIVATE_THREADS", "Use Private Threads") - .replace("USE_EXTERNAL_STICKERS", "Use External Stickers") - .replace("USE_APPLICATION_COMMANDS", "Use Application Commands")}\n`; - }); - embed.setDescription(x + description + x); - interaction.followUp({ embeds: [embed] }); - }, -}; diff --git a/command/Moderation/purge.js b/unused/commands/Moderation/purge.js diff --git a/command/Moderation/role.js b/unused/commands/Moderation/role.js diff --git a/command/Moderation/slowmode.js b/unused/commands/Moderation/slowmode.js diff --git a/command/Moderation/unban.js b/unused/commands/Moderation/unban.js diff --git a/command/Moderation/unmute.js b/unused/commands/Moderation/unmute.js diff --git a/unused/commands/Moderation/warn.js b/unused/commands/Moderation/warn.js @@ -0,0 +1,273 @@ +const db = require("../../../models/warns"); +const moment = require("moment"); +const { MessageEmbed } = require("discord.js"); +module.exports = { + name: "warn", + UserPerms: ["MANAGE_MESSAGES"], + description: "Add/remove/show warnings of an user", + category: "Moderation", + options: [ + { + type: "SUB_COMMAND", + name: "add", + description: "Warn a user", + options: [ + { + type: 6, + name: "user", + description: "The user you want to warn", + required: true, + }, + { + type: 3, + name: "reason", + description: "The reason you want to warn", + required: false, + }, + ], + }, + { + type: "SUB_COMMAND", + name: "list", + description: "Show a list of warnings of an user", + options: [ + { + type: 6, + name: "user", + description: "The user to show the list", + required: true, + }, + ], + }, + { + type: "SUB_COMMAND", + name: "remove", + description: "Remove a latest warn for an user", + options: [ + { + type: 6, + name: "user", + description: "The user to remove warn", + required: true, + }, + { + type: 4, + name: "number", + description: "The number of warn", + required: true, + }, + ], + }, + { + type: "SUB_COMMAND", + name: "clear", + description: "Clear an user's warns", + options: [ + { + type: 6, + name: "user", + description: "The user to clear warns", + required: true, + }, + ], + }, + ], + run: async (client, interaction, args) => { + try { + if (args[0] == "add") { + const user = interaction.guild.members.cache.get(args[1]); + const reason = args[2] || "No reason provided"; + if (user.id === interaction.user.id) { + interaction.followUp({ content: "You can't warn yourself" }); + } + if ( + interaction.member.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ content: "You don't have enough hierarchy" }); + } + if ( + interaction.guild.me.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ + content: "Bot doesn't have enough hierarchy", + }); + } + if (reason.length > 1024) reason = reason.slice(0, 1021) + "..."; + db.findOne( + { Guild: interaction.guild.id, User: user.id }, + async (err, data) => { + if (!data) { + data = new db({ + Guild: interaction.guild.id, + User: user.id, + Warns: [ + { + Reason: reason, + Moderator: interaction.user.id, + Timestamp: Date.now(), + }, + ], + }); + } else { + data.Warns.push({ + Reason: reason, + Moderator: interaction.user.id, + Timestamp: Date.now(), + }); + } + data.save(); + } + ); + user + .send({ + content: `You have been warned in **${interaction.guild.name}** for **${reason}**`, + }) + .catch(e => {}); + const embed = new MessageEmbed() + .setTitle("User Warned") + .addField("**Moderator**", interaction.user.tag, true) + .addField("**User**", user.user.tag, true) + .addField("**Reason**", reason, true) + .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) + .setTimestamp() + .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) + .setColor(client.color); + interaction.followUp({ embeds: [embed] }); + } else if (args[0] == "list") { + const user = interaction.guild.members.cache.get(args[1]); + db.findOne( + { Guild: interaction.guild.id, User: user.id }, + async (err, data) => { + if (data.Warns.map(e => e).length > 0) { + interaction.followUp({ + embeds: [ + new MessageEmbed() + .setTitle(`${user.user.tag}'s warns`) + .setDescription( + data.Warns.map( + (w, i) => + `\`${i + 1}\` | Moderator: ${ + interaction.guild.members.cache.get(w.Moderator) || + "Unknown" + }\nReason: ${w.Reason}\nDate: ${moment( + w.Timestamp + ).format("MMMM Do YYYY")}` + ).join("\n\n") + ) + .setFooter( + `Made by ${client.author}`, + client.user.displayAvatarURL() + ) + .setTimestamp() + .setColor(client.color), + ], + }); + } else { + interaction.followUp({ + content: `User doesn't have any warns`, + }); + } + } + ); + } else if (args[0] == "remove") { + const user = interaction.guild.members.cache.get(args[1]); + if ( + interaction.member.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ content: "You don't have enough hierarchy" }); + } + if ( + interaction.guild.me.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ + content: "Bot doesn't have enough hierarchy", + }); + } + db.findOne( + { Guild: interaction.guild.id, User: user.id }, + async (err, data) => { + if (err) throw err; + if (data) { + const number = args[2] - 1; + data.Warns.splice(number, 1); + const embed = new MessageEmbed() + .setTitle("Warn Removed") + .addField("**Moderator**", interaction.user.tag, true) + .addField("**User**", user.user.tag, true) + .setFooter( + `Made by ${client.author}`, + client.user.displayAvatarURL() + ) + .setTimestamp() + .setThumbnail( + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color); + interaction.followUp({ embeds: [embed] }); + data.save(); + } else { + interaction.followUp({ + content: `User doesn't have any warns`, + }); + } + } + ); + } else { + const user = interaction.guild.members.cache.get(args[1]); + if ( + interaction.member.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ content: "You don't have enough hierarchy" }); + } + if ( + interaction.guild.me.roles.highest.position < + user.roles.highest.position + ) { + interaction.followUp({ + content: "Bot doesn't have enough hierarchy", + }); + } + db.findOne( + { Guild: interaction.guild.id, User: user.id }, + async (err, data) => { + if (data) { + await db.findOneAndDelete({ + Guild: interaction.guild.id, + User: user.id, + }); + interaction.followUp({ + embeds: [ + new MessageEmbed() + .setTitle(`Warns Cleared`) + .addField("**Moderator**", interaction.user.tag, true) + .addField("**User**", user.user.tag, true) + .setFooter( + `Made by ${client.author}`, + client.user.displayAvatarURL() + ) + .setTimestamp() + .setThumbnail( + interaction.user.displayAvatarURL({ dynamic: true }) + ) + .setColor(client.color), + ], + }); + } else { + interaction.followUp({ + content: `User doesn't have any warns`, + }); + } + } + ); + } + } catch (e) { + console.log(e); + interaction.followUp({ content: `**Error**: ${e.message}` }); + } + }, +}; diff --git a/command/Music/bassboost.js b/unused/commands/Music/bassboost.js diff --git a/command/Music/clearqueue.js b/unused/commands/Music/clearqueue.js diff --git a/command/Music/disconnect.js b/unused/commands/Music/disconnect.js diff --git a/command/Music/grab.js b/unused/commands/Music/grab.js diff --git a/command/Music/loop.js b/unused/commands/Music/loop.js diff --git a/command/Music/move.js b/unused/commands/Music/move.js diff --git a/command/Music/nowplaying.js b/unused/commands/Music/nowplaying.js diff --git a/command/Music/pause.js b/unused/commands/Music/pause.js diff --git a/command/Music/play.js b/unused/commands/Music/play.js diff --git a/command/Music/queue.js b/unused/commands/Music/queue.js diff --git a/command/Music/remove.js b/unused/commands/Music/remove.js diff --git a/command/Music/resume.js b/unused/commands/Music/resume.js diff --git a/command/Music/seek.js b/unused/commands/Music/seek.js diff --git a/command/Music/shuffle.js b/unused/commands/Music/shuffle.js diff --git a/command/Music/skip.js b/unused/commands/Music/skip.js diff --git a/command/Music/volume.js b/unused/commands/Music/volume.js diff --git a/unused/commands/Owner/encrypt.js b/unused/commands/Owner/encrypt.js @@ -1,39 +0,0 @@ -module.exports = { - name: "code", - Owner: true, - run: async (client, message, args) => { - const encrypted = encrypt(args.slice(0).join(" ")); - message.channel.send(`\`\`\`${encrypted}\`\`\``); - message.channel.send(`\`\`\`${decrypt(encrypted)}\`\`\``); - const str; - function encrypt(inp) { - let str = inp.split(""), - out = ""; - str.forEach((c, i) => { - if (c == " ") { - out += " "; - } else if (i % 3 == 0) { - out += String.fromCharCode(c.charCodeAt(0) + 3); - } else { - out += String.fromCharCode(c.charCodeAt(0) - 2); - } - }); - return out; - } - - function decrypt(inp) { - let str = inp.split(""), - out = ""; - str.forEach((c, i) => { - if (c == " ") { - out += " "; - } else if (i % 3 == 0) { - out += String.fromCharCode(c.charCodeAt(0) - 3); - } else { - out += String.fromCharCode(c.charCodeAt(0) + 2); - } - }); - return out; - } - }, -}; diff --git a/command/Owner/add.js b/unused/commands/Utilities/add.js diff --git a/command/Utilities/afk.js b/unused/commands/Utilities/afk.js diff --git a/unused/commands/Utilities/codebin.js b/unused/commands/Utilities/codebin.js @@ -1,4 +1,4 @@ -const CodeClient = require("../../../client/CodeClient"); +const CodeClient = require("../../client/CodeClient"); module.exports = { name: "Create Code Bin", type: "MESSAGE", diff --git a/unused/commands/Utilities/docs.js b/unused/commands/Utilities/docs.js @@ -1,27 +0,0 @@ -const axios = require("axios"); -module.exports = { - name: "docs", - usage: "(Query)", - description: "Search the discord.js docs for something!", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "query", - description: "The query you want to search", - required: true, - }, - ], - run: async (client, interaction, args) => { - const query = args.join(" "); - await axios - .get( - `https://djsdocs.sorta.moe/v2/embed?src=stable&q=${encodeURIComponent( - query - )}` - ) - .then(async data => { - interaction.followUp({ embeds: [data.data] }); - }); - }, -}; diff --git a/unused/commands/Utilities/draw.js b/unused/commands/Utilities/draw.js @@ -0,0 +1,82 @@ +const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); +const draws = require("../../../util/Data/draws.json"); +module.exports = { + name: "draw", + description: "Buy a lucky draw", + run: async (client, message, args, utils) => { + const embed = new MessageEmbed() + .setTitle("**__Daily Lucky Draw__**") + .setColor(client.color) + .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) + .setTimestamp() + .setDescription( + "Welcome to the Lucky Draw,\nclick `Spin`, so that the draw spins and hits a random item.\nClick `Info` to find out how high the probability is\n that a particular item will be unlocked" + ) + .addFields( + draws[0].map(c => { + return { name: c.name, value: c.emoji, inline: true }; + }) + ); + + const button1 = new MessageButton() + .setStyle("SUCCESS") + .setEmoji("šŸ”„") + .setLabel("Spin") + .setCustomId("spin"); + const button2 = new MessageButton() + .setStyle("PRIMARY") + .setEmoji("894962394932064346") + .setLabel("Info") + .setCustomId("spininfo"); + + const row = new MessageActionRow().addComponents([button1, button2]); + const msg = await message.channel.send({ + embeds: [embed], + components: [row], + }); + const filter = i => + ["spin", "spininfo"].includes(i.customId) && + i.user.id === message.author.id; + const collector = msg.createMessageComponentCollector({ + filter, + time: 999999, + }); + function select() { + let pick = Math.floor(Math.random() * 100); + for (const g in draws[0]) { + pick -= draws[0][g].percent; + if (pick <= 0) { + return `You got **${draws[0][g].name}** with propability **${draws[0][g].percent}%**`; + } + } + } + console.log(utils.colorize("test").magenta); + collector.on("collect", i => { + if (i.customId === "spin") { + i.reply({ + content: select(), + }); + } + if (i.customId === "spininfo") { + i.reply({ + embeds: [ + new MessageEmbed() + .setTitle("**__Information Table__**") + .addFields( + draws[0].map(c => { + return { + name: `**${c.name}**`, + value: `Percentage: ${c.percent}%`, + inline: true, + }; + }) + ) + .addField("Name:", "**Item 1**") + .addField("Percent:", "**69**") + .addField("Emoji:", ":bughuntergold:"), + ], + }); + } + }); + }, +}; diff --git a/command/Utilities/emoji.js b/unused/commands/Utilities/emoji.js diff --git a/command/Utilities/emojiadd.js b/unused/commands/Utilities/emojiadd.js diff --git a/command/Utilities/esnipe.js b/unused/commands/Utilities/esnipe.js diff --git a/unused/commands/Utilities/github.js b/unused/commands/Utilities/github.js @@ -1,61 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -const moment = require("moment"); -const axios = require("axios"); -module.exports = { - name: "github", - description: `Get Github User Information`, - options: [ - { - type: 3, - name: "username", - description: "The username you want to search", - required: true, - }, - ], - run: async (client, interaction, args) => { - try { - axios - .get(`https://api.github.com/users/${args[0]}`) - .then(res => res.data) - .then(body => { - if (body.message) { - return interaction.followUp({ content: "User Not Found" }); - } - const { - login, - avatar_url, - id, - public_repos, - followers, - following, - location, - created_at, - bio, - } = body; - const embed = new MessageEmbed() - .setAuthor(`${login} Information`, avatar_url) - .setColor(client.color) - .setThumbnail(`${avatar_url}`) - .setTimestamp() - .addField(`Username`, `${login}`) - .addField(`ID`, `${id}`) - .addField(`Bio`, `${bio || "None"}`) - .addField(`Public Repositories`, `${public_repos || "None"}`, true) - .addField(`Followers`, `${followers}`, true) - .addField(`Following`, `${following}`, true) - .addField(`Location`, `${location || "None"}`) - .addField( - `Account Created`, - moment.utc(created_at).format("dddd, MMMM, Do YYYY") - ) - .setFooter( - `Made by ${client.author}`, - client.user.displayAvatarURL() - ); - interaction.followUp({ embeds: [embed] }); - }); - } catch (error) { - console.log(error); - } - }, -}; diff --git a/unused/commands/Utilities/giveaway.js b/unused/commands/Utilities/giveaway.js @@ -0,0 +1,144 @@ +const GiveawaysClient = require("../../client/GiveawaysClient"); +module.exports = { + name: "giveaway", + description: "Giveaway", + UserPerms: ["MANAGE_MESSAGES"], + options: [ + { + type: "SUB_COMMAND", + name: "start", + description: "Start a giveaway", + options: [ + { + type: 3, + name: "prize", + description: "The prize of the giveaway", + required: true, + choices: [], + }, + { + type: 4, + name: "winners", + description: "The amount of winners of the giveaway", + required: true, + }, + { + type: 3, + name: "time", + description: "The amount of time of the giveaway", + required: true, + }, + { + type: 7, + name: "channel", + description: "The channel of the giveaway", + required: true, + channelTypes: ["GUILD_TEXT"], + }, + { + type: 8, + name: "role1", + description: "The required role to join the giveaway", + }, + { + type: 8, + name: "role2", + description: "The required role to join the giveaway", + }, + { + type: 8, + name: "role3", + description: "The required role to join the giveaway", + }, + ], + }, + { + type: "SUB_COMMAND", + name: "reroll", + description: "Reroll a giveaway", + options: [ + { + type: 3, + name: "message", + description: "The message ID of the giveaway", + required: true, + choices: [], + }, + ], + }, + { + type: "SUB_COMMAND", + name: "end", + description: "End a giveaway", + options: [ + { + type: 3, + name: "message", + description: "The message ID of the giveaway", + required: true, + choices: [], + }, + ], + }, + ], + run: async (client, interaction, args, utils) => { + if (args[0] == "start") { + const [, prize, winners, time, channel, roles1, roles2, roles3] = args; + if (!utils.ms(time)) { + interaction.followUp({ + content: "Time must be a valid time to parse (Example: 10m, 100s)", + }); + } + await GiveawaysClient.create(client, { + prize, + host: interaction.user.id, + winners, + endAfter: time, + requirements: roles1 + ? { + Enabled: true, + Roles: [roles1], + } + : roles2 && roles1 + ? { + Enabled: true, + Roles: [roles1, roles2], + } + : roles1 && roles2 && roles3 + ? { + Enabled: true, + Roles: [roles1, roles2, roles3], + } + : { Enabled: false }, + Channel: channel, + }); + interaction.followUp({ + content: `Giveaway is started in ${interaction.guild.channels.cache.get( + channel + )}`, + }); + } else if (args[0] == "reroll") { + const giveaway = await GiveawaysClient.getByMessage(args[1]); + const m = await client.guilds.cache + .get(giveaway.Guild) + .channels.cache.get(giveaway.Channel) + .messages.fetch(args[1]); + if (!m) { + interaction.followUp({ content: "Unable to find the giveaway āš " }); + } else { + await GiveawaysClient.end(m, giveaway, m); + } + } else { + const giveaway = await GiveawaysClient.getByMessage(args[1]); + const m = await client.guilds.cache + .get(giveaway.Guild) + .channels.cache.get(giveaway.Channel) + .messages.fetch(args[1]); + if (!m) { + interaction.followUp({ content: "Unable to find the giveaway āš " }); + } else { + await GiveawaysClient.end(m, giveaway, m); + } + } + }, +}; diff --git a/unused/commands/Utilities/hexcolor.js b/unused/commands/Utilities/hexcolor.js @@ -1,54 +0,0 @@ -const { MessageEmbed, MessageAttachment } = require("discord.js"); -const axios = require("axios"); - -module.exports = { - name: "hexcolor", - usage: "(Hex Color Code)", - description: "Get Hex and RGB info of a color", - category: "Utilities", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "code", - description: "Color code you want to see (Example: #FF0000)", - required: false, - }, - ], - run: async (client, interaction, args) => { - let color; - if (args[0]) { - if (/(#|0x)([0-9A-F]{6})/i.test(args[0])) { - color = args[0].match(/(#|0x)([0-9A-F]{6})/i)[2]; - } - else { - return interaction.followUp({ - content: "Please give a valid Hex Color Code (Example: #FF0000)", - }); - } - } - else { - color = interaction.member.displayHexColor.replace("#", "", "0x", ""); - } - const colour = await axios - .get(`${process.env.api}/api/v1/hexcolor/${color}`) - .then(res => res.data); - const rightpic = new MessageAttachment(colour.image, "wea.jpg"); - const attachment = new MessageAttachment(colour.row, "color.jpg"); - const embed = new MessageEmbed() - .setColor(colour.hex) - .setDescription( - `\`HEX: ${colour.hex}} RGB: ${colour.rgb}}\`\nšŸ”½Color SchemešŸ”½`, - ) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setTitle("Color Information (Click here for more info)") - .setURL(`https://www.colorhexa.com/${colour.clean}`) - .setImage("attachment://color.jpg") - .setThumbnail("attachment://wea.jpg"); - interaction.followUp({ - embeds: [embed], - files: [attachment, rightpic], - }); - }, -}; diff --git a/unused/commands/Utilities/lb.js b/unused/commands/Utilities/lb.js @@ -1,34 +0,0 @@ -// const Levels = require("discord-xp"); -// const { MessageEmbed } = require("discord.js"); -// module.exports = { -// name: "leaderboard", -// timeout: 5000, -// description: "Check the leaderboard of a server", -// category: "Economy", -// Level: true, -// run: async (client, interaction, args) => { -// const rawLeaderboard = await Levels.fetchLeaderboard( -// interaction.guild.id, -// 10 -// ); -// if (rawLeaderboard.length < 1) -// return interaction.followUp({ content: "There isn't any data" }); -// const leaderboard = await Levels.computeLeaderboard( -// client, -// rawLeaderboard, -// true -// ); -// const lb = leaderboard.map( -// e => -// `**${e.position}**. ${e.username}#${e.discriminator} Level: ${ -// e.level -// } XP: ${e.xp.toLocaleString()}` -// ); -// const embed = new MessageEmbed() -// .setTitle(`**Leaderboard for ${interaction.guild.name}**`) -// .setDescription(`\n${lb.join("\n")}`) -// .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) -// .setColor(client.color); -// interaction.followUp({ embeds: [embed] }); -// }, -// }; diff --git a/command/Utilities/lyrics.js b/unused/commands/Utilities/lyrics.js diff --git a/command/Utilities/nsfw.js b/unused/commands/Utilities/nsfw.js diff --git a/unused/commands/Utilities/poll.js b/unused/commands/Utilities/poll.js @@ -1,38 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "poll", - description: "Start a poll in a channel", - category: "Utilities", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "description", - description: "The description of the poll", - required: true, - }, - { - type: 7, - name: "channel", - description: "The channel you want to send the poll", - required: false, - channelTypes: ["GUILD_TEXT"], - }, - ], - run: async (client, interaction, args) => { - await interaction.deleteReply(); - const pollDescription = ` - ${interaction.member} asks: ${args[0]}`; - const channel = - interaction.guild.channels.cache.get(args[1]) || interaction.channel; - const embedPoll = new MessageEmbed() - .setTitle(`${interaction.user.tag} made a poll`) - .setDescription(pollDescription) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setColor("GREEN"); - const msgEmbed = await channel.send({ embeds: [embedPoll] }); - await msgEmbed.react("šŸ‘"); - await msgEmbed.react("šŸ‘Ž"); - }, -}; diff --git a/unused/commands/Utilities/rank.js b/unused/commands/Utilities/rank.js @@ -1,303 +0,0 @@ -// const Levels = require("discord-xp"); -// const Canvas = require("canvas"), -// Discord = require(`discord.js`); -// const { registerFont } = require("canvas"); -// registerFont("./util/assets/fonts/Poppins-Regular.ttf", { -// family: "Poppins-Regular", -// }); -// registerFont("./util/assets/fonts/Poppins-SemiBold.ttf", { -// family: "Poppins-Bold", -// }); -// module.exports = { -// name: "rank", -// description: "Shows an image of someone's ranking", -// type: "CHAT_INPUT", -// options: [ -// { -// type: 6, -// name: "user", -// description: "The user you want to see", -// required: false, -// }, -// ], -// run: async (client, interaction, args) => { -// const badges = [1, 8]; -// for (let i = badges[0]; i <= badges[1]; i++) client[`badge${i}`] = null; -// setBadge = function (variable, value) { -// const number = Number(variable); -// for (let i = badges[0]; i <= badges[1]; i++) -// if (number === i) { -// client[`badge${number}`] = value; -// break; -// } -// return client; -// }; - -// const member = -// interaction.guild.members.cache.get(args[0]) || interaction.member; - -// const user = await Levels.fetch(member.id, interaction.guild.id); -// console.log(user); -// const canvas = Canvas.createCanvas(1080, 400), -// ctx = canvas.getContext("2d"); - -// let BackgroundRadius = "50", //50 | 0 if u want no rounded background | 50 if u want a very rounded background -// BackGroundImg = "https://images7.alphacoders.com/109/1092420.jpg", -// AttachmentName = "rank.png", -// Username = member.user.username, -// AvatarRoundRadius = "50", // 30 if u want squared round Avatar | 100 IF u want rounded -// DrawLayerColor = "#000000", -// DrawLayerOpacity = "0.4", -// BoxColor = "#6eaedb", //Lvl and REP Box COlor -// LevelBarFill = "#ffffff", // -// LevelBarBackground = "#ffffff", -// Rank = user.position, -// TextEXP = "20XP", -// TextReputation = "+ 2.18k rep", -// BarRadius = "15", -// TextXpNeded = "{current}/{needed}", -// CurrentXP = user.xp, -// NeededXP = Levels.xpFor(parseInt(user.level) + 1); - -// //SET BADGES -// //setBadge("1", "Bronze") // .png | file name need to be Number_Name in this case is "1_bronze" -// //setBadge("2", "Gold") // .png | file name need to be Number_Name in this case is "2_Gold" -// //SET BADGES - -// //BackGround -// ctx.beginPath(); -// ctx.moveTo(0 + Number(BackgroundRadius), 0); -// ctx.lineTo(0 + 1080 - Number(BackgroundRadius), 0); -// ctx.quadraticCurveTo(0 + 1080, 0, 0 + 1080, 0 + Number(BackgroundRadius)); -// ctx.lineTo(0 + 1080, 0 + 400 - Number(BackgroundRadius)); -// ctx.quadraticCurveTo( -// 0 + 1080, -// 0 + 400, -// 0 + 1080 - Number(BackgroundRadius), -// 0 + 400 -// ); - -// ctx.lineTo(0 + Number(BackgroundRadius), 0 + 400); -// ctx.quadraticCurveTo(0, 0 + 400, 0, 0 + 400 - Number(BackgroundRadius)); -// ctx.lineTo(0, 0 + Number(BackgroundRadius)); -// ctx.quadraticCurveTo(0, 0, 0 + Number(BackgroundRadius), 0); -// ctx.closePath(); -// ctx.clip(); -// ctx.fillStyle = "#000000"; -// ctx.fillRect(0, 0, 1080, 400); -// let background = await Canvas.loadImage(BackGroundImg); -// ctx.drawImage(background, 0, 0, 1080, 400); -// ctx.restore(); - -// //Layer -// ctx.fillStyle = DrawLayerColor; -// ctx.globalAlpha = DrawLayerOpacity; -// ctx.fillRect(40, 0, 240, canvas.height); -// ctx.globalAlpha = 1; - -// //RoundedBox Function -// function RoundedBox(ctx, x, y, width, height, radius) { -// ctx.beginPath(); -// ctx.moveTo(x + radius, y); -// ctx.lineTo(x + width - radius, y); -// ctx.quadraticCurveTo(x + width, y, x + width, y + radius); -// ctx.lineTo(x + width, y + height - radius); -// ctx.quadraticCurveTo( -// x + width, -// y + height, -// x + width - radius, -// y + height -// ); -// ctx.lineTo(x + radius, y + height); -// ctx.quadraticCurveTo(x, y + height, x, y + height - radius); -// ctx.lineTo(x, y + radius); -// ctx.quadraticCurveTo(x, y, x + radius, y); -// ctx.closePath(); -// } - -// //Avatar -// let avatar = await Canvas.loadImage( -// member.user.displayAvatarURL({ dynamic: true, format: "png" }) -// ); -// ctx.save(); -// RoundedBox(ctx, 40 + 30, 30, 180, 180, Number(AvatarRoundRadius)); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.drawImage(avatar, 40 + 30, 30, 180, 180); -// ctx.restore(); -// //Avatar - -// //Reputation -// ctx.save(); -// RoundedBox(ctx, 40 + 30, 30 + 180 + 30, 180, 50, 10); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.fillStyle = BoxColor; -// ctx.globalAlpha = "1"; -// ctx.fillRect(40 + 30, 30 + 180 + 30, 180, 50, 50); -// ctx.globalAlpha = 1; -// ctx.fillStyle = "#ffffff"; -// ctx.shadowColor = "#000000"; -// ctx.shadowBlur = 20; -// ctx.shadowOffsetX = 1; -// ctx.shadowOffsetY = 1; -// ctx.font = '32px "Poppins-Bold"'; -// ctx.textAlign = "center"; -// ctx.fillText(TextReputation, 40 + 30 + 180 / 2, 30 + 180 + 30 + 38); -// ctx.restore(); -// //Reputation - -// //EXP -// ctx.save(); -// RoundedBox(ctx, 40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50, 10); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.fillStyle = BoxColor; -// ctx.globalAlpha = "1"; -// ctx.fillRect(40 + 30, 30 + 180 + 30 + 50 + 30, 180, 50); -// ctx.globalAlpha = 1; -// ctx.fillStyle = "#ffffff"; -// ctx.shadowColor = "#000000"; -// ctx.shadowBlur = 20; -// ctx.shadowOffsetX = 1; -// ctx.shadowOffsetY = 1; -// ctx.font = '32px "Poppins-Bold"'; -// ctx.textAlign = "center"; -// ctx.fillText(TextEXP, 40 + 30 + 180 / 2, 30 + 180 + 30 + 30 + 50 + 38); -// ctx.restore(); -// //EXP - -// //ctx.save() -// //ctx.textAlign = "left"; -// //ctx.fillStyle = "#ffffff"; -// //ctx.shadowColor = '#000000'; -// //ctx.font = '15px "Poppins-Bold"' -// //ctx.fillText(member.user.username, 390, 200); -// //ctx.restore() - -// //Username -// ctx.save(); -// ctx.textAlign = "left"; -// ctx.fillStyle = "#ffffff"; -// ctx.shadowColor = "#000000"; -// ctx.shadowBlur = 15; -// ctx.shadowOffsetX = 1; -// ctx.shadowOffsetY = 1; -// ctx.font = '39px "Poppins-Bold"'; -// ctx.fillText(Username, 390, 80); -// ctx.restore(); -// //Username - -// //Rank -// ctx.save(); -// ctx.textAlign = "right"; -// ctx.fillStyle = "#ffffff"; -// ctx.shadowColor = "#000000"; -// ctx.shadowBlur = 15; -// ctx.shadowOffsetX = 1; -// ctx.shadowOffsetY = 1; -// ctx.font = '55px "Poppins-Bold"'; -// ctx.fillText("#" + Rank, canvas.width - 50 - 5, 80); -// ctx.restore(); - -// //Rank Name -// ctx.save(); -// ctx.textAlign = "left"; -// ctx.fillStyle = "#ffffff"; -// ctx.shadowColor = "#000000"; -// ctx.shadowBlur = 15; -// ctx.shadowOffsetX = 1; -// ctx.shadowOffsetY = 1; -// ctx.font = '30px "Poppins-Bold"'; -// ctx.fillText("Diamond Nature", 390, 120); -// ctx.restore(); - -// //Badges -// ctx.save(); -// RoundedBox(ctx, 390, 305, 660, 70, Number(15)); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.fillStyle = "#ffffff"; -// ctx.globalAlpha = "0.2"; -// ctx.fillRect(390, 305, 660, 70); -// ctx.restore(); -// const badgeNames = ["1", "2", "3", "4", "5", "6", "7", "8"]; -// for (let index = 0; index < badgeNames.length; index++) { -// let badge = `badge${index + 1}`; -// if (!client[badge]) { -// ctx.fillStyle = "#ffffff"; -// ctx.globalAlpha = "0.2"; -// ctx.textAlign = "center"; -// ctx.font = '90px "Poppins-Bold"'; -// ctx.fillText(".", 75 * index + 450, 345); -// } else { -// ctx.globalAlpha = 1; -// let badgeImg = await Canvas.loadImage( -// ["bronze", "silver", "gold", "diamond"].includes( -// client[badge].toLowerCase() -// ) -// ? `${__dirname}/${badgeNames[index]}_${client[ -// badge -// ].toLowerCase()}.png` -// : client[badge] -// ); -// ctx.drawImage(badgeImg, 75 * index + 420, 315, 50, 50); -// } -// } -// //Badges - -// //Level Bar -// ctx.save(); -// RoundedBox(ctx, 390, 145, 660, 50, Number(BarRadius)); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.fillStyle = LevelBarBackground; -// ctx.globalAlpha = "0.2"; -// ctx.fillRect(390, 145, 660, 50, 50); -// ctx.restore(); - -// const percent = (100 * CurrentXP) / NeededXP; -// const progress = (percent * 660) / 100; - -// ctx.save(); -// RoundedBox(ctx, 390, 145, progress, 50, Number(BarRadius)); -// ctx.strokeStyle = "#BFC85A22"; -// ctx.stroke(); -// ctx.clip(); -// ctx.fillStyle = LevelBarFill; -// ctx.globalAlpha = "0.5"; -// ctx.fillRect(390, 145, progress, 50, 50); -// ctx.restore(); - -// //Next Rank -// ctx.save(); -// ctx.textAlign = "left"; -// ctx.fillStyle = "#ffffff"; -// ctx.globalAlpha = "0.8"; -// ctx.font = '30px "Poppins-Bold"'; -// ctx.fillText("Next Rank: " + "None", 390, 230); -// ctx.restore(); - -// const latestXP = Number(CurrentXP) - Number(NeededXP); -// const textXPEdited = TextXpNeded.replace(/{needed}/g, NeededXP) -// .replace(/{current}/g, CurrentXP) -// .replace(/{latest}/g, latestXP); -// ctx.textAlign = "center"; -// ctx.fillStyle = "#ffffff"; -// ctx.globalAlpha = 1; -// ctx.font = '30px "Poppins-Bold"'; -// ctx.fillText(textXPEdited, 730, 180); -// //Level Bar - -// const attachment = new Discord.MessageAttachment( -// canvas.toBuffer(), -// AttachmentName -// ); -// interaction.followUp({ files: [attachment] }); -// }, -// }; diff --git a/unused/commands/Utilities/shorturl.js b/unused/commands/Utilities/shorturl.js @@ -1,4 +1,4 @@ -const URLClient = require("../../../client/URLClient"); +const URLClient = require("../../client/URLClient"); module.exports = { name: "shorten-url", description: "Shorten a URL", diff --git a/command/Utilities/snipe.js b/unused/commands/Utilities/snipe.js diff --git a/unused/commands/Utilities/timer.js b/unused/commands/Utilities/timer.js @@ -1,77 +0,0 @@ -const { MessageEmbed } = require("discord.js"); -module.exports = { - name: "timer", - description: "Set a timer for yourself", - usage: "(Time)", - category: "Utilities", - type: "CHAT_INPUT", - options: [ - { - type: 3, - name: "time", - description: "The time you want to set", - required: true, - }, - ], - run: async (client, interaction, args, utils) => { - const time = args[0]; - const mss = utils.ms(args[0]); - if (!time.endsWith("d")) { - if (!time.endsWith("h")) { - if (!time.endsWith("m")) { - if (!time.endsWith("w")) { - if (!time.endsWith("mo")) { - if (!time.endsWith("s")) { - return interaction.followUp({ - content: "You can only use valid time (Example: 3s)", - }); - } - } - } - } - } - } - if (isNaN(time[0])) { - return interaction.followUp({ - content: "You can only use valid time (Example: 3s)", - }); - } - client.Timers.set(interaction.user.id + " G " + interaction.guild.name, { - Guild: interaction.guild.name, - Author: { - Tag: interaction.user.tag, - ID: interaction.user.id, - }, - Time: mss, - }); - interaction.followUp({ - content: `${interaction.user} you have set a timer for ${utils.timer( - mss, - )}.`, - }); - setTimeout(() => { - const Embed = new MessageEmbed() - .setTitle(`Timer finished in ${interaction.guild.name}.`) - .setDescription(`Your timer for ${utils.timer(mss)} has finished.`) - .setURL(client.web) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setColor(`GREEN`); - const embe = new MessageEmbed() - .setTitle(`Timer finished.`) - .setDescription(`Your timer for ${utils.timer(mss)} has finished.`) - .setURL(client.web) - .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) - .setTimestamp() - .setColor(`GREEN`); - interaction.channel.send({ - content: `${interaction.user}`, - embeds: [embe], - }); - interaction.user.send({ embeds: [Embed] }); - client.Timers.delete( - interaction.user.id + " G " + interaction.guild.name, - ); - }, utils.ms(time)); - }, -}; diff --git a/util/dist/err.js b/unused/err.js diff --git a/unused/events/afk.js b/unused/events/afk.js @@ -0,0 +1,25 @@ +const client = require("../.."); +client.on("messageCreate", async message => { + if (message.author.bot || !message.guild) return; + const dataa = await client.data.getUser(message.author.id); + if (dataa?.AFK) { + message.reply({ + content: `Welcome back <@${dataa.User}>! I have removed your AFK status.`, + }); + const nothahaa = message.guild.members.cache.get(message.author.id); + nothahaa.setNickname(`${message.author.username}`).catch(); + await client.data.DelAFK(message.author.id); + } + if (message.mentions.users.first()?.id) { + const data1 = await client.data.getUser( + message.mentions.members.first()?.id + ); + if (data1?.AFK) { + message.reply({ + content: `**${ + message.mentions.members.first().user.tag + }** is in afk **(${data1.AFK})**`, + }); + } + } +}); diff --git a/unused/events/messageCreate.js b/unused/events/messageCreate.js @@ -1,243 +0,0 @@ -// const client = require("../bot"); -// const codmclient = require("../client/CODMClient"); -// const leven = require("leven"); -// const { MessageEmbed } = require("discord.js"); -// const schema = require("../unused/models/custom-commands"); -// const cooldown = require("../models/cooldown"); -// const utils = require("../util/functions/function"); -// client.on("messageCreate", async message => { -// const p = await client.prefix(message); -// if (message.author.bot || !message.guild) return; -// if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { -// const _ = new MessageEmbed() -// .setTitle(client.user.username) -// .addField("Links:", client.cat) -// .addField( -// "Prefix/Usage", -// `My prefix in **${message.guild.name}** is **${p}**\n\nRun \`${p}help\` to start using the bot` -// ) -// .setThumbnail(client.user.displayAvatarURL()) -// .setURL(client.web) -// .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) -// .setTimestamp() -// .setColor(client.color); -// const m = await message.reply({ embeds: [_] }); -// setTimeout(() => m.delete(), 15000); -// } -// if (p) { -// if (!message.content.toLowerCase().startsWith(p.toLowerCase())) return; -// } -// if (!message.member) -// message.member = await message.guild.fetchMember(message); -// const data = {}; -// let guildDB = await client.data.getGuild(message.guild.id); -// if (!guildDB) return; -// let userDB = await client.data.getUser(message.author.id); -// if (!userDB) return; -// let userEconDB = await client.data.getUserEcon(message.author.id); -// data.Guild = guildDB; -// data.User = userDB; -// data.UserEcon = userEconDB; -// if (!guildDB) await client.data.CreateGuild(message.guild.id); -// if (!userEconDB) await client.createProfile(message.author.id); -// if (data.User) { -// if (data.User.Blacklist) return; -// } -// const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); -// if (cmd.length == 0) return; -// const cmddata = await schema.findOne({ -// Guild: message.guild.id, -// Command: cmd, -// }); -// if (!cmddata) { -// const command = -// client.commands.get(cmd.toLowerCase()) || -// client.commands.find(c => c.aliases?.includes(cmd.toLowerCase())); -// if (!command) { -// const best = [ -// ...client.commands.map(cmd => cmd.name), -// ...client.aliases.keys(), -// ].filter(c => leven(cmd.toLowerCase(), c.toLowerCase()) < c.length * 0.4); -// const dym = -// best.length == 0 -// ? "" -// : best.length == 1 -// ? `Do you mean this?\n**${best[0]}**` -// : `Do you mean one of these?\n${best -// .slice(0, 3) -// .map(value => `**${value}**`) -// .join("\n")}`; -// if (dym === "") return; -// else { -// const msg = await message.reply({ -// embeds: [ -// new MessageEmbed() -// .setDescription(`Couldn't find that command.\n${dym}`) -// .setTimestamp() -// .setColor(client.color), -// ], -// }); -// setTimeout(function () { -// msg.delete(); -// }, 10000); -// } -// } -// if (command) { -// if (command.Owner) { -// if (!client.owners.includes(message.author.id)) return; -// } -// if (command.Premium) { -// if (!data.User.Premium) { -// return message.reply({ -// embeds: [ -// new MessageEmbed() -// .setURL(client.web) -// .setAuthor( -// message.author.tag, -// message.author.displayAvatarURL({ dynamic: true }) -// ) -// .setColor(client.color) -// .setDescription( -// `You aren't a premium user. You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team to be premium user` -// ) -// .setTimestamp() -// .setFooter( -// `Made by ${client.author}`, -// client.user.displayAvatarURL() -// ), -// ], -// }); -// } -// } -// if (command.Level) { -// if (!data.Guild.Level) return; -// } -// if (!message.guild.me.permissions.has(command.BotPerm || [])) -// return message.reply({ -// content: `You can't use this command. I need to have ${command.BotPerm} permission to use this command.`, -// }); -// client.channels.cache.get(client.CMDLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, -// }); -// if (data.Guild) { -// if (data.Guild.Category) { -// if (data.Guild.Category.includes(command.directory)) return; -// } -// if (data.Guild.Commands) { -// if (data.Guild.Commands.includes(command.name)) return; -// } -// } -// if (command.timeout) { -// const current_time = Date.now(); -// const cooldown_amount = command.timeout; -// cooldown.findOne( -// { User: message.author.id, CMD: command.name }, -// async (err, data) => { -// if (data) { -// const expiration_time = data.Time + cooldown_amount; -// if (current_time < expiration_time) { -// utils.cooldown(data.Time, cooldown_amount, message); -// } else { -// await cooldown.findOneAndUpdate( -// { User: message.author.id, CMD: command.name }, -// { Time: current_time } -// ); -// command.run(client, message, args, utils, data, codmclient); -// client.addcmdsused(message.author.id); -// client.channels.cache.get(client.CMDLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, -// }); -// } -// } else { -// command.run(client, message, args, utils, data, codmclient); -// client.channels.cache.get(client.CMDLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, -// }); -// client.addcmdsused(message.author.id); -// new cooldown({ -// User: message.author.id, -// CMD: command.name, -// Time: current_time, -// Cooldown: command.timeout, -// }).save(); -// } -// } -// ); -// } else { -// try { -// command.run(client, message, args, utils, data, codmclient); -// client.channels.cache.get(client.CMDLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, -// }); -// client.addcmdsused(message.author.id); -// } catch (e) { -// console.log(e); -// } -// } -// } -// } else { -// if (cmddata.Delete === true && cmddata.Random === false) { -// message -// .delete() -// .then(() => message.channel.send({ content: cmddata.Response })); -// } else if (cmddata.Random === true && cmddata.Delete === true) { -// const randomed = -// cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; -// message.delete().then(() => message.channel.send({ content: randomed })); -// } else if (cmddata.Random === true && cmddata.Delete === false) { -// const randomed = -// cmddata.Response[Math.floor(Math.random() * cmddata.Response.length)]; -// message.channel.send({ content: randomed }); -// } else { -// message.channel.send({ content: cmddata.Response }); -// } -// } -// }); -// client.on("messageCreate", async message => { -// const p = await client.prefix(message); -// if (message.author.bot) return; -// if (!message.content.startsWith(p)) return; -// if (!message.guild) return; -// if (!message.member) -// message.member = await message.guild.fetchMember(message); -// const [cmd, ...args] = message.content.slice(p.length).trim().split(/ +/g); -// if (cmd.length == 0) return; -// let path = client.hide.get(cmd); -// if (path) { -// if (!client.path.includes(message.guild.id)) return; -// try { -// path.run(client, message, args); -// client.addcmdsused(message.author.id); -// client.channels.cache.get(client.CMDLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${path.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``, -// }); -// } catch (e) { -// console.log(e); -// } -// } -// }); -// client.on("messageCreate", async message => { -// if (message.channel.type === "DM" && !message.author.bot) { -// if (message.attachments) { -// if (message.attachments && message.content) { -// message.attachments.map(e => -// client.channels.cache.get(client.config.DMLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`: ${ -// message.content + e.url -// }`, -// }) -// ); -// } else { -// message.attachments.map(e => -// client.channels.cache.get(client.config.DMLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`: ${e.url}`, -// }) -// ); -// } -// } else { -// client.channels.cache.get(client.config.DMLog).send({ -// content: `\`${message.author.tag}(${message.author.id})\`: ${message.content}`, -// }); -// } -// } -// }); diff --git a/events/messageDelete.js b/unused/events/messageDelete.js diff --git a/unused/events/messageReaction.js b/unused/events/messageReaction.js @@ -1,30 +0,0 @@ -const client = require("../../bot"); -const Schema = require("../models/reaction"); - -client.on("messageReactionAdd", async (reaction, user) => { - if (reaction.message.partial) await reaction.message.fetch(); - if (reaction.partial) await reaction.fetch(); - if (user.bot) return; - if (!reaction.message.guild) return; - Schema.findOne({ Message: reaction.message.id }, async (err, data) => { - if (!data) return; - if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return; - const [roleid] = data.Roles[reaction.emoji.name]; - reaction.message.guild.members.cache.get(user.id).roles.add(roleid); - user.send(`A role has been added`); - }); -}); -client.on("messageReactionRemove", async (reaction, user) => { - if (reaction.message.partial) await reaction.message.fetch(); - if (reaction.partial) await reaction.fetch(); - if (user.bot) return; - if (!reaction.message.guild) return; - Schema.findOne({ Message: reaction.message.id }, async (err, data) => { - if (!data) return; - if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return; - - const [roleid] = data.Roles[reaction.emoji.name]; - reaction.message.guild.members.cache.get(user.id).roles.remove(roleid); - user.send(`A role has been removed`); - }); -}); diff --git a/events/messageUpdate.js b/unused/events/messageUpdate.js diff --git a/unused/events/raw.js b/unused/events/raw.js @@ -0,0 +1,2 @@ +const client = require("../.."); +client.on("raw", c => client.manager.updateVoiceState(c)); diff --git a/unused/events/starboard.js b/unused/events/starboard.js @@ -0,0 +1,8 @@ +const client = require("../.."); +const starboardclient = require("../client/StarboardClient"); +client.on("messageReactionAdd", async reaction => { + starboardclient.listener(reaction); +}); +client.on("messageReactionRemove", async reaction => { + starboardclient.listener(reaction); +}); diff --git a/unused/events/voiceStateUpdate.js b/unused/events/voiceStateUpdate.js @@ -0,0 +1,63 @@ +const { MessageEmbed } = require("discord.js"); +const client = require("../.."); +client.on("voiceStateUpdate", async (oldState, newState) => { + const guildId = newState.guild.id; + const player = client.manager.get(guildId); + if (!player || player.state !== "CONNECTED") return; + + const stateChange = {}; + if (oldState.channel === null && newState.channel !== null) { + stateChange.type = "JOIN"; + } + if (oldState.channel !== null && newState.channel === null) { + stateChange.type = "LEAVE"; + } + if (oldState.channel !== null && newState.channel !== null) { + stateChange.type = "MOVE"; + } + if (oldState.channel === null && newState.channel === null) return; + if (newState.serverMute == true && oldState.serverMute == false) { + return player.pause(true); + } + if (newState.serverMute == false && oldState.serverMute == true) { + return player.pause(false); + } + if (stateChange.type === "MOVE") { + if (oldState.channel.id === player.voiceChannel) stateChange.type = "LEAVE"; + if (newState.channel.id === player.voiceChannel) stateChange.type = "JOIN"; + } + if (stateChange.type === "JOIN") stateChange.channel = newState.channel; + if (stateChange.type === "LEAVE") stateChange.channel = oldState.channel; + if (!stateChange.channel || stateChange.channel.id !== player.voiceChannel) { + return; + } + stateChange.members = stateChange.channel.members.filter( + member => !member.user.bot + ); + switch (stateChange.type) { + case "JOIN": + if (stateChange.members.size === 1 && player.paused) { + const emb = new MessageEmbed() + .setAuthor(`Resumed`, client.user.displayAvatarURL()) + .setColor(client.config.color) + .setDescription( + `Resuming the player as somebody join the voice channel` + ); + client.channels.cache.get(player.textChannel).send({ embeds: [emb] }); + player.pause(false); + } + break; + case "LEAVE": + if (stateChange.members.size === 0 && !player.paused && player.playing) { + player.pause(true); + const emb = new MessageEmbed() + .setAuthor(`Paused`, client.user.displayAvatarURL()) + .setColor(client.config.color) + .setDescription( + `The player has been paused as nobody is in the voice channel` + ); + client.channels.cache.get(player.textChannel).send({ embeds: [emb] }); + } + break; + } +}); diff --git a/unused/models/reaction.js b/unused/models/reaction.js @@ -1,10 +0,0 @@ -const mongoose = require("mongoose"); - -module.exports = mongoose.model( - "reaction-roles", - new mongoose.Schema({ - Guild: String, - Message: String, - Roles: Object, - }), -); diff --git a/data/APEX/apex.json b/util/Data/APEX/apex.json diff --git a/util/Data/APEX/legends.json b/util/Data/APEX/legends.json @@ -0,0 +1,24 @@ +{ + "Banglore": [ + { + "legend_image": "https://media.discordapp.net/attachments/973918659007377408/973918831443574834/unknown.png?width=548&height=613", + "intro": "https://youtu.be/JyJhFYNob30", + "wiki": "https://apexlegends.fandom.com/wiki/Bangalore", + "codename": "Professional Soldier", + "type": "offensive", + "avalable": true, + "tactical": "Smoke Launcher", + "tactical_description": "Fire a high-velocity smoke canister that explodes into a smoke wall on impact.", + "tactical_cooldown": 33, + "tactical_link": "https://apexlegends.fandom.com/wiki/Bangalore#Smoke_Launcher", + "passive": " Double Time", + "passive_description": "Taking fire while sprinting makes you move faster for a brief time.", + "passive_link": "https://apexlegends.fandom.com/wiki/Bangalore#Double_Time", + "ultimate": "Rolling Thunder", + "ultimate_description": "Call in an artillery strike that slowly creeps across the landscape.", + "ultimate_chargetime": 180, + "ultimate_link": "https://apexlegends.fandom.com/wiki/Bangalore#Rolling_Thunder" + } + ], + "Bloodhound": "" +} +\ No newline at end of file diff --git a/data/CODM/loadout.js b/util/Data/CODM/loadout.js diff --git a/data/CODM/new-stats.js b/util/Data/CODM/new-stats.js diff --git a/data/CODM/stats.js b/util/Data/CODM/stats.js diff --git a/util/assets/fonts/Poppins-Regular.ttf b/util/assets/fonts/Poppins-Regular.ttf Binary files differ. diff --git a/util/assets/fonts/Poppins-SemiBold.ttf b/util/assets/fonts/Poppins-SemiBold.ttf Binary files differ. diff --git a/util/dist/handler.js b/util/dist/handler.js @@ -30,26 +30,5 @@ module.exports = async client => { client.on("ready", async () => { await client.guilds.cache.get("840225563193114624").commands.set(ownercmds); await client.application.commands.set(cmds); - // .then(async cmd => { - // client.guilds.cache.forEach(g => { - // const getroles = name => { - // const perms = cmds.find(n => n.name == name).UserPerms; - // if (!perms) return null; - // return g.roles.cache.filter( - // z => z.permissions.has(perms) && !z.managed - // ); - // }; - // const fullPermissions = cmd.reduce((accumulator, v) => { - // const roles = getroles(v.name); - // if (!roles) return accumulator; - // const permissions = roles.reduce((a, w) => { - // return [...a, { id: w.id, type: "ROLE", permission: true }]; - // }, []); - // return [...accumulator, { id: v.id, permissions }]; - // }, []); - // g.commands.permissions.set({ fullPermissions }).catch(null); - // }); - // }) - // .catch(null); }); };