├── .gitignore ├── databases ├── infos │ ├── placeholder.md │ └── enmap.sqlite └── settings │ └── placeholder.md ├── .replit ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── reportar-um-problema-bug.md │ └── sugest-o-de-nova-funcionalidade.md └── workflows │ ├── reacte_issues.yml │ └── codeql-analysis.yml ├── events ├── client │ ├── debug.js │ ├── warn.js │ ├── error.js │ ├── disconnect.js │ ├── reconnecting.js │ ├── rateLimit.js │ ├── shardReconnecting.js │ ├── shardError.js │ ├── shardReady.js │ ├── shardDisconnect.js │ ├── shardResume.js │ └── ready.js └── guild │ ├── threadCreate.js │ ├── voiceStateUpdate.js │ └── interactionCreate.js ├── commands ├── Diversão │ ├── say.js │ └── ratewaifu.js ├── Utilidade │ ├── avatar.js │ ├── moeda.js │ └── covid.js ├── Info │ ├── ping.js │ ├── help.js │ ├── source.js │ ├── commandcount.js │ ├── invite.js │ ├── support.js │ └── uptime.js ├── Dev │ └── getinvite.js ├── ação │ └── atacar.js ├── Configurações │ ├── defaultautoplay.js │ ├── prefix.js │ ├── defaultvolume.js │ ├── defaultfilter.js │ └── dj.js ├── Song │ ├── addend.js │ ├── replay.js │ ├── lyrics.js │ ├── rewind.js │ ├── seek.js │ ├── forward.js │ ├── grab.js │ └── nowplaying.js ├── Filtro │ ├── list.js │ ├── clear.js │ ├── customspeed.js │ ├── custombassboost.js │ ├── add.js │ ├── set.js │ └── remove.js ├── Musica │ ├── addrelated.js │ ├── skip.js │ ├── autoplay.js │ ├── stop.js │ ├── play.js │ ├── playskip.js │ └── playtop.js └── Fila │ ├── shuffle.js │ ├── clear.js │ ├── previous.js │ ├── volume.js │ ├── jump.js │ ├── status.js │ ├── list.js │ └── loop.js ├── SECURITY.md ├── handlers ├── antiCrash.js ├── commands.js └── events.js ├── dashboard ├── views │ ├── footer.ejs │ ├── header.ejs │ ├── queuedashboard.ejs │ ├── dashboard.ejs │ └── index.ejs └── public │ ├── commands.css │ └── style.css ├── LICENSE ├── package.json ├── README.md └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.json 3 | bg.png -------------------------------------------------------------------------------- /databases/infos/placeholder.md: -------------------------------------------------------------------------------- 1 | this folder is a db -------------------------------------------------------------------------------- /databases/settings/placeholder.md: -------------------------------------------------------------------------------- 1 | this folder is a db -------------------------------------------------------------------------------- /.replit: -------------------------------------------------------------------------------- 1 | language = "nodejs" 2 | run = "npx node index.js" -------------------------------------------------------------------------------- /databases/infos/enmap.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Programador-jr/King/HEAD/databases/infos/enmap.sqlite -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://kingbot.cf", "https://www.paypal.com/donate/?hosted_button_id=MQZXXV7DF6QE8"] 2 | -------------------------------------------------------------------------------- /events/client/debug.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, info) => { 3 | console.log(String(info).grey); 4 | } -------------------------------------------------------------------------------- /events/client/warn.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, error) => { 3 | console.log(String(error).yellow.dim); 4 | } -------------------------------------------------------------------------------- /events/client/error.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, error) => { 3 | console.log(String(error).red.dim); 4 | } 5 | -------------------------------------------------------------------------------- /events/client/disconnect.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = client => { 3 | console.log(`Você foi desconectado em ${new Date()}.`.dim) 4 | } 5 | 6 | -------------------------------------------------------------------------------- /events/client/reconnecting.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = client => { 3 | console.log(`Reconectando em ${new Date()}.`.bgYellow.black) 4 | } 5 | -------------------------------------------------------------------------------- /events/client/rateLimit.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, rateLimitData) => { 3 | console.log(JSON.stringify(rateLimitData).grey.italic.dim); 4 | } 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Faça uma pergunta 3 | url: https://github.com/Programador-jr/King/discussions/new 4 | about: Faça e discuta perguntas com outros membros da comunidade 5 | -------------------------------------------------------------------------------- /events/client/shardReconnecting.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, id) => { 3 | console.log(` || <==> || [${String(new Date).split(" ", 5).join(" ")}] || <==> || Shard #${id} Reconectando || <==> ||`)} -------------------------------------------------------------------------------- /events/client/shardError.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, error, id) => { 3 | console.log(` || <==> || [${String(new Date).split(" ", 5).join(" ")}] || <==> || Shard #${id} Erro || <==> ||`) 4 | } 5 | -------------------------------------------------------------------------------- /events/client/shardReady.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, id) => { 3 | console.log(` || <==> || [${String(new Date).split(" ", 5).join(" ")}] || <==> || Shard #${id} Preparado || <==> ||`) 4 | } 5 | -------------------------------------------------------------------------------- /events/client/shardDisconnect.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, event, id) => { 3 | console.log(` || <==> || [${String(new Date).split(" ", 5).join(" ")}] || <==> || Shard #${id} Desconectado || <==> ||`) 4 | } 5 | -------------------------------------------------------------------------------- /events/client/shardResume.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | module.exports = (client, id, replayedEvents) => { 3 | console.log(` || <==> || [${String(new Date).split(" ", 5).join(" ")}] || <==> || Shard #${id} Retomado || <==> ||`) 4 | } 5 | -------------------------------------------------------------------------------- /events/guild/threadCreate.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, thread) => { 2 | if(thread.joinable){ 3 | try{ 4 | await thread.join(); 5 | }catch (e){ 6 | console.log(e) 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /commands/Diversão/say.js: -------------------------------------------------------------------------------- 1 | const discord = require('discord.js'); 2 | 3 | module.exports = { 4 | name:"say", 5 | aliases:["falar", "dizer"], 6 | category:"Diversão", 7 | cooldown: "3", 8 | run: async (client, message, args) => { 9 | const sayMessage = args.join(' '); 10 | message.delete().catch(O_o => {}); 11 | message.channel.send(sayMessage); 12 | } 13 | }; -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/reportar-um-problema-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Reportar um Problema/Bug 3 | about: "Aaaah, bugs! 👾 - Reporte bugs no King!" 4 | title: " " 5 | labels: "bug 🐞" 6 | assignees: ' ' 7 | 8 | --- 9 | 10 | 11 | **Qual é o problema?** 12 | 13 | Descrição sobre qual é o problema 14 | 15 | **Como reproduzir o problema?** 16 | 17 | 1. Descreva aqui 18 | 2. Quais passos a gente precisa fazer 19 | 3. Para conseguir encontrar o bug 20 | 4. Use imagens para explicar melhor o problema! 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /handlers/antiCrash.js: -------------------------------------------------------------------------------- 1 | module.exports = client => { 2 | process.on('unhandledRejection', (reason, p) => { 3 | console.log(' [antiCrash] :: Rejeição não tratada/Catch'); 4 | console.log(reason, p); 5 | }); 6 | process.on("uncaughtException", (err, origin) => { 7 | console.log(' [antiCrash] :: Exceção não capturada/Catch'); 8 | console.log(err, origin); 9 | }) 10 | process.on('uncaughtExceptionMonitor', (err, origin) => { 11 | console.log(' [antiCrash] :: Exceção não capturada/Catch (MONITOR)'); 12 | console.log(err, origin); 13 | }); 14 | process.on('multipleResolves', (type, promise, reason) => { 15 | console.log(' [antiCrash] :: Múltiplas Resoluções'); 16 | console.log(type, promise, reason); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/sugest-o-de-nova-funcionalidade.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Sugestão de Nova Funcionalidade 3 | about: Sugira uma ideia para este projeto 4 | title: '' 5 | labels: 'Suggestion 👾' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Sua solicitação de recurso está relacionada a um problema? se sim Por favor descreva.** 11 | Uma descrição clara e concisa de qual é o problema. Ex. Sempre fico frustrado quando [...] 12 | 13 | ** Descreva a solução que você gostaria ** 14 | Uma descrição clara e concisa do que você deseja que aconteça 15 | 16 | ** Descreva as alternativas que você considerou ** 17 | Uma descrição clara e concisa de quaisquer soluções ou recursos alternativos que você considerou 18 | 19 | ** Contexto adicional ** 20 | Adicione qualquer outro contexto ou capturas de tela sobre a solicitação de recurso aqui 21 | -------------------------------------------------------------------------------- /commands/Utilidade/avatar.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | module.exports = { 4 | name: 'avatar', 5 | aliases: ['avatar', 'pfp'], 6 | cooldown: 5, 7 | guildOnly: false, 8 | 9 | run: async(client, message, args) => { 10 | if (!message.guild.me.permissions.has('ATTACH_FILES')) return message.reply('Eu preciso da permissão `enviar arquvios` para fazer isso!'); 11 | 12 | const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author; 13 | 14 | const avatar = user.displayAvatarURL({ dynamic: true, size: 1024 }); 15 | const embed = new Discord.MessageEmbed() 16 | .setColor('#00bfff') 17 | .setTitle(`Avatar de ${user.username}`) 18 | .setDescription(`Clique [aqui](${avatar}) para baixar o avatar`) 19 | .setImage(avatar); 20 | await message.reply({embeds: [embed]}); 21 | }, 22 | }; -------------------------------------------------------------------------------- /commands/Info/ping.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js'); 2 | var ee = require(`../../botconfig/embed.json`) 3 | module.exports = { 4 | name: "ping", 5 | description: "Exibe a latência do usuário e do bot", 6 | category: "info", 7 | 8 | run: async (client, message, args) => { 9 | 10 | let start = Date.now(); 11 | 12 | message.channel.send("**Parece que o bot está lento...**").then(m => { 13 | 14 | let end = Date.now(); 15 | let ping = m.createdTimestamp - message.createdTimestamp 16 | const embed = new MessageEmbed() 17 | .setAuthor("🏓 | Pong!", message.author.avatarURL()) 18 | .setColor("#00FA9A") 19 | .addField("Latência da API", `\`${Math.round(client.ws.ping)}ms\``, true) 20 | .addField("latência do Usuário", `\`${end - start}ms\``, true) 21 | .setFooter(ee.footertext, ee.footericon); 22 | message.channel.send({ embeds: [embed]}) 23 | m.delete() 24 | }) 25 | } 26 | }; -------------------------------------------------------------------------------- /.github/workflows/reacte_issues.yml: -------------------------------------------------------------------------------- 1 | name: Auto React 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | issue_opened: 9 | # This job only runs for issue comments 10 | name: Issue opened 11 | if: ${{ !github.event.issue.pull_request }} 12 | runs-on: ubuntu-latest 13 | steps: 14 | - run: | 15 | echo "Comment on issue #${{ github.event.issue.number }} ${{ github.repository }}" 16 | - name: Add Thumbs Up Reaction 17 | run: | 18 | curl https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions -H "Accept: application/vnd.github.squirrel-girl-preview" --data '{"content":"+1"}' -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" 19 | - name: Add Confused Reaction 20 | run: | 21 | curl https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions -H "Accept: application/vnd.github.squirrel-girl-preview" --data '{"content":"confused"}' -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" 22 | -------------------------------------------------------------------------------- /dashboard/views/footer.ejs: -------------------------------------------------------------------------------- 1 |
2 | 12 |
-------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 King 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commands/Utilidade/moeda.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const axios = require('axios') 3 | const ee = require('../../botconfig/embed.json'); 4 | 5 | module.exports = { 6 | name:"moeda", 7 | run:async (client, message, args, default_prefix) => { 8 | const apiTotal = `https://economia.awesomeapi.com.br/json/all/USD-BRL,EUR-BRL,BTC-BRL,CAD-BRL`; 9 | 10 | const { 11 | data: { USD, EUR, BTC, CAD }, 12 | } = await axios.get(apiTotal); 13 | 14 | const embed = await new Discord.MessageEmbed() 15 | .setTitle("Cotação das pricipais Moedas:") 16 | .setColor(ee.color) 17 | .setAuthor(`${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true, size: 2048 })) 18 | .addFields( 19 | { name: "🇺🇸 Dolar", value: `R$ ${USD.bid}`, inline: true }, 20 | { name: "🇨🇦 Dolar canadense", value: `R$ ${CAD.bid}`, inline: true }, 21 | { name: "🇪🇺 Euro", value: `R$ ${EUR.bid}`, inline: true }, 22 | { name: "₿ Bitcoin", value: `R$ ${BTC.bid}`, inline: true }, 23 | ) 24 | .setFooter(ee.footertext, ee.footericon) 25 | message.channel.send({ embeds: [embed]}); 26 | } 27 | } -------------------------------------------------------------------------------- /handlers/commands.js: -------------------------------------------------------------------------------- 1 | const { 2 | readdirSync 3 | } = require("fs"); 4 | console.log("Bem-vindo ao MANIPULADOR DE SERVIÇO".yellow); 5 | module.exports = (client) => { 6 | try { 7 | let amount = 0; 8 | readdirSync("./commands/").forEach((dir) => { 9 | const commands = readdirSync(`./commands/${dir}/`).filter((file) => file.endsWith(".js")); 10 | for (let file of commands) { 11 | let pull = require(`../commands/${dir}/${file}`); 12 | if (pull.name) { 13 | client.commands.set(pull.name, pull); 14 | amount++; 15 | } else { 16 | console.log(file, `error -> falta um help.name ou help.name não é uma string.`.brightRed); 17 | continue; 18 | } 19 | if (pull.aliases && Array.isArray(pull.aliases)) pull.aliases.forEach((alias) => client.aliases.set(alias, pull.name)); 20 | } 21 | }); 22 | console.log(`${amount} Comandos carregados`.brightGreen); 23 | } catch (e) { 24 | console.log(String(e.stack).bgRed) 25 | } 26 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@discordjs/builders": "^0.6.0", 4 | "@discordjs/opus": "^0.6.0", 5 | "@discordjs/voice": "^0.6.0", 6 | "@distube/soundcloud": "^0.2.2", 7 | "@distube/spotify": "^0.6.3", 8 | "@ksoft/api": "^3.1.9", 9 | "aki-api": "^6.0.8", 10 | "axios": "^0.22.0", 11 | "body-parser": "^1.19.0", 12 | "bootstrap-icons": "^1.6.1", 13 | "canvas": "^2.8.0", 14 | "colors": "^1.4.0", 15 | "cpu-stat": "^2.0.1", 16 | "discord.js": "^13.1.0", 17 | "distube": "^3.0.0-beta.37", 18 | "ejs": "^3.1.6", 19 | "enmap": "^5.8.7", 20 | "express": "^4.17.1", 21 | "express-session": "^1.17.2", 22 | "ffmpeg-static": "^4.4.0", 23 | "http": "^0.0.1-security", 24 | "https-proxy-agent": "^5.0.0", 25 | "libsodium-wrappers": "^0.7.9", 26 | "memorystore": "^1.6.6", 27 | "mongoose": "^6.0.7", 28 | "ms": "^2.1.3", 29 | "node-fetch": "^3.1.1", 30 | "os": "^0.1.2", 31 | "passport": "^0.4.1", 32 | "passport-discord": "^0.1.4", 33 | "pretty-ms": "^7.0.1", 34 | "session": "^0.1.0", 35 | "url": "^0.11.0" 36 | }, 37 | "devDependencies": { 38 | "node": "^16.10.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /commands/Info/help.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | const websiteSettings = require("../../dashboard/settings.json"); 8 | module.exports = { 9 | name: "help", //the command name for execution & for helpcmd [OPTIONAL] 10 | 11 | category: "Info", 12 | usage: "help [cmdname]", 13 | aliases: ["h", "halp", "helpme", "hilfe"], 14 | 15 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 16 | description: "Retorna todos os comandos ou um comando específico", //the command description for helpcmd [OPTIONAL] 17 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | 22 | const embed = new MessageEmbed() 23 | .setColor(ee.color) 24 | .setThumbnail(ee.footericon) 25 | .setTitle("⚠ Comando ainda em deselvolvimento") 26 | 27 | await message.reply({ embeds: [embed]}); 28 | 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /commands/Info/source.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | var ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "source", //the command name for execution & for helpcmd [OPTIONAL] 9 | 10 | category: "Info", 11 | usage: "source", 12 | aliases: ["github"], 13 | 14 | cooldown: 5, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | description: "Envia a você informações de código-fonte", //the command description for helpcmd [OPTIONAL] 16 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | message.reply({ 22 | embeds: [ 23 | new MessageEmbed().setColor(ee.color) 24 | .setFooter(ee.footertext, ee.footericon) 25 | .setDescription(`**WHEN YOU USE THE SOURCE CODE, __GIVE CREDITS__!** :heart:\n\n[Link para a fonte](https://github.com/Programador-jr/King)`) 26 | ] 27 | }); 28 | } catch (e) { 29 | console.log(String(e.stack).bgRed) 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /commands/Info/commandcount.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | var ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "commandcount", //the command name for execution & for helpcmd [OPTIONAL] 9 | category: "Info", 10 | usage: "commandcount", 11 | aliases: ["cmds", "commandc", "count", "cmdcount"], 12 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 13 | description: "Mostra a quantidade de comandos e categorias", //the command description for helpcmd [OPTIONAL] 14 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 15 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 16 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 17 | run: async (client, message, args) => { 18 | try { 19 | message.reply({ 20 | embeds: [new MessageEmbed() 21 | .setColor(ee.color) 22 | .setFooter(ee.footertext, ee.footericon) 23 | .setTitle(`:gear: **[${client.commands.size}] Comandos**`) 24 | .setDescription(`:gear: **[${client.categories.length}] Categorias**\n\n:gear: **[${client.slashCommands.size + client.slashCommands.map(d => d.options).flat().length}]Comandos Slash**\n\n`) 25 | ] 26 | }); 27 | } catch (e) { 28 | console.log(String(e.stack).bgRed) 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /commands/Info/invite.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | var ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "invite", //the command name for execution & for helpcmd [OPTIONAL] 9 | 10 | category: "Info", 11 | usage: "invite", 12 | aliases: ["inviteme", "addme", "convite", "convidar" ], 13 | 14 | cooldown: 5, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | description: "Envia um link de convite para você", //the command description for helpcmd [OPTIONAL] 16 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | message.reply({ 22 | embeds: [ 23 | new MessageEmbed().setColor(ee.color) 24 | .setFooter(ee.footertext, ee.footericon) 25 | .setDescription(`[**Clique aqui para me convidar!**](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=8&scope=bot%20applications.commands)\n\n||[**Clique aqui para me convidar __SEM__ Comandos Slash!**](https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=8&scope=bot)||`) 26 | ] 27 | }); 28 | } catch (e) { 29 | console.log(String(e.stack).bgRed) 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /events/guild/voiceStateUpdate.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, oldState, newState) => { 2 | if ( 3 | (!oldState.streaming && newState.streaming) || 4 | (oldState.streaming && !newState.streaming) || 5 | (!oldState.serverDeaf && newState.serverDeaf) || 6 | (oldState.serverDeaf && !newState.serverDeaf) || 7 | (!oldState.serverMute && newState.serverMute) || 8 | (oldState.serverMute && !newState.serverMute) || 9 | (!oldState.selfDeaf && newState.selfDeaf) || 10 | (oldState.selfDeaf && !newState.selfDeaf) || 11 | (!oldState.selfMute && newState.selfMute) || 12 | (oldState.selfMute && !newState.selfMute) || 13 | (!oldState.selfVideo && newState.selfVideo) || 14 | (oldState.selfVideo && !newState.selfVideo) 15 | ) 16 | if (!oldState.channelId && newState.channelId) { 17 | if(newState.channel.type == "GUILD_STAGE_VOICE" && newState.guild.me.voice.suppress){ 18 | try{ 19 | await newState.guild.me.voice.setSuppressed(false); 20 | }catch (e){ 21 | console.log(String(e).grey) 22 | } 23 | } 24 | return 25 | } 26 | if (oldState.channelId && !newState.channelId) { 27 | return 28 | } 29 | if (oldState.channelId && newState.channelId) { 30 | if(newState.channel.type == "GUILD_STAGE_VOICE" && newState.guild.me.voice.suppress){ 31 | try{ 32 | await newState.guild.me.voice.setSuppressed(false); 33 | }catch (e){ 34 | console.log(String(e).grey) 35 | } 36 | } 37 | return; 38 | } 39 | } -------------------------------------------------------------------------------- /commands/Dev/getinvite.js: -------------------------------------------------------------------------------- 1 | const ownerid = "718669518452293713"; 2 | 3 | module.exports = { 4 | name: "getinvite", 5 | aliases: ['getinv', 'gi'], 6 | category: "Dev", 7 | description: "Gera um convite para o servidor em questão.", 8 | usage: "[ID | nome]", 9 | 10 | run: async(bot, message, args) => { 11 | if (message.author.id === ownerid) { 12 | let guild = null; 13 | 14 | if (!args[0]) return message.channel.send("Digite um nome") 15 | 16 | if(args[0]){ 17 | let fetched = bot.guilds.cache.find(g => g.name === args.join(" ")); 18 | let found = bot.guilds.cache.get(args[0]); 19 | if(!found) { 20 | if(fetched) { 21 | guild = fetched; 22 | } 23 | } else { 24 | guild = found 25 | } 26 | } else { 27 | return message.channel.send("Nome inválido!"); 28 | } 29 | if(guild){ 30 | let tChannel = guild.channels.cache.find(ch => ch.type == "text" && ch.permissionsFor(ch.guild.me).has("CREATE_INSTANT_INVITE")); 31 | if(!tChannel) { 32 | return message.channel.send("Ocorreu um erro, tente novamente!"); 33 | } 34 | let invite = await tChannel.createInvite({ temporary: false, maxAge: 0 }).catch(err => { 35 | return message.channel.send(`${err} ocorreu!`); 36 | }); 37 | message.channel.send(invite.url); 38 | } else { 39 | return message.channel.send(`\`${args.join(' ')}\` - O bot não está neste servidor`); 40 | } 41 | } else { 42 | return; 43 | } 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /events/client/ready.js: -------------------------------------------------------------------------------- 1 | //here the event starts 2 | const config = require("../../botconfig/config.json") 3 | const { change_status } = require("../../handlers/functions"); 4 | module.exports = client => { 5 | //SETTING ALL GUILD DATA FOR THE DJ ONLY COMMANDS for the DEFAULT 6 | //client.guilds.cache.forEach(guild=>client.settings.set(guild.id, ["autoplay", "clearqueue", "forward", "loop", "jump", "loopqueue", "loopsong", "move", "pause", "resume", "removetrack", "removedupe", "restart", "rewind", "seek", "shuffle", "skip", "stop", "volume"], "djonlycmds")) 7 | try{ 8 | try{ 9 | const stringlength = 69; 10 | console.log("\n") 11 | console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.brightGreen) 12 | console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) 13 | console.log(` ┃ `.bold.brightGreen + `O Bot está online!`.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length-`O Bot está online!`.length)+ "┃".bold.brightGreen) 14 | console.log(` ┃ `.bold.brightGreen + ` /--/ ${client.user.tag} /--/ `.bold.brightGreen+ " ".repeat(-1+stringlength-` ┃ `.length-` /--/ ${client.user.tag} /--/ `.length)+ "┃".bold.brightGreen) 15 | console.log(` ┃ `.bold.brightGreen + " ".repeat(-1+stringlength-` ┃ `.length)+ "┃".bold.brightGreen) 16 | console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.brightGreen) 17 | }catch{ /* */ } 18 | change_status(client); 19 | //loop through the status per each 10 minutes 20 | setInterval(()=>{ 21 | change_status(client); 22 | }, 15 * 1000); 23 | 24 | } catch (e){ 25 | console.log(String(e.stack).grey.italic.dim.bgRed) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /commands/ação/atacar.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | 3 | const ee = require("../../botconfig/embed.json"); 4 | 5 | module.exports = { 6 | name: 'atacar', 7 | aliases: ['attack'], 8 | cooldown: 5, 9 | 10 | run: async(client, message, args) => { 11 | const list = [ 12 | 'https://cdn.zerotwo.dev/PUNCH/38a3ab62-17f4-4682-873a-121e886d7bce.gif', 13 | 'https://cdn.zerotwo.dev/PUNCH/84c082d0-24e7-491e-bcfc-be03ee46125c.gif', 14 | 'https://cdn.zerotwo.dev/PUNCH/3a5b2598-a973-4e6f-a1d0-9b87a2c35a18.gif', 15 | ]; 16 | 17 | const rand = list[Math.floor(Math.random() * list.length)]; 18 | const user = message.mentions.users.first() || client.users.cache.get(args[0]); 19 | if (!user) { 20 | return message.reply('lembre-se de mencionar um usuário válido para atacar!'); 21 | } 22 | 23 | const avatar = message.author.displayAvatarURL({ format: 'png' }); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(ee.wrongcolor) 26 | .setDescription(`${message.author} atacou ${user}`) 27 | .setImage(rand) 28 | .setTimestamp() 29 | .setFooter('Reaja com 🌟 para retribuir') 30 | .setAuthor(message.author.tag, avatar) 31 | await message.reply({embeds: [embed]}).then((msg) => { 32 | msg.react('🌟') 33 | 34 | const filter = (reaction, user) => reaction.emoji.name === '🌟' && user.id === message.author.id; 35 | const collector = msg.createReactionCollector({filter, max: 1, time: 60000 }); 36 | collector.on('collect', (reaction, user) => { 37 | const repeat = new Discord.MessageEmbed() 38 | .setColor(ee.wrongcolor) 39 | .setDescription(`${user} **Atacou** ${message.author}`) 40 | .setImage(rand) 41 | 42 | message.reply({embeds: [repeat]}) 43 | }) 44 | 45 | }) 46 | } 47 | }; -------------------------------------------------------------------------------- /commands/Info/support.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | var ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "support", //the command name for execution & for helpcmd [OPTIONAL] 9 | 10 | category: "Info", 11 | usage: "support", 12 | aliases: ["server"], 13 | 14 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | description: "Sends a Link of the Support Server", //the command description for helpcmd [OPTIONAL] 16 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | //things u can directly access in an interaction! 22 | const { 23 | member, 24 | channelId, 25 | guildId, 26 | applicationId, 27 | commandName, 28 | deferred, 29 | replied, 30 | ephemeral, 31 | options, 32 | id, 33 | createdTimestamp 34 | } = message; 35 | const { 36 | guild 37 | } = member; 38 | message.reply({ 39 | content: "https://discord.gg/milrato" 40 | }); 41 | } catch (e) { 42 | console.log(String(e.stack).bgRed) 43 | } 44 | } 45 | } 46 | /** 47 | * @INFO 48 | * Bot Coded by Tomato#6966 | https://github.com/Tomato6966/discord-js-lavalink-Music-Bot-erela-js 49 | * @INFO 50 | * Work for Milrato Development | https://milrato.eu 51 | * @INFO 52 | * Please mention Him / Milrato Development, when using this Code! 53 | * @INFO 54 | */ 55 | -------------------------------------------------------------------------------- /commands/Info/uptime.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const { 7 | duration 8 | } = require("../../handlers/functions") 9 | const settings = require("../../botconfig/settings.json"); 10 | module.exports = { 11 | name: "uptime", //the command name for execution & for helpcmd [OPTIONAL] 12 | 13 | category: "Info", 14 | usage: "uptime", 15 | 16 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 17 | description: "Returns the duration on how long the Bot is online", //the command description for helpcmd [OPTIONAL] 18 | memberpermissions: [], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 19 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 20 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 21 | run: async (client, message, args) => { 22 | try { 23 | //things u can directly access in an interaction! 24 | const { 25 | member, 26 | channelId, 27 | guildId, 28 | applicationId, 29 | commandName, 30 | deferred, 31 | replied, 32 | ephemeral, 33 | options, 34 | id, 35 | createdTimestamp 36 | } = message; 37 | const { 38 | guild 39 | } = member; 40 | message.reply({ 41 | embeds: [new MessageEmbed() 42 | .setColor(ee.color) 43 | .setFooter(ee.footertext, ee.footericon) 44 | .setTitle(`:white_check_mark: **${client.user.username}** is since:\n ${duration(client.uptime).map(t=>`\`${t}\``).join(", ")} online`) 45 | ] 46 | }); 47 | } catch (e) { 48 | console.log(String(e.stack).bgRed) 49 | } 50 | } 51 | } 52 | /** 53 | * @INFO 54 | * Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template 55 | * @INFO 56 | * Work for Milrato Development | https://milrato.eu 57 | * @INFO 58 | * Please mention Him / Milrato Development, when using this Code! 59 | * @INFO 60 | */ 61 | -------------------------------------------------------------------------------- /commands/Configurações/defaultautoplay.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "defaultautoplay", //the command name for execution & for helpcmd [OPTIONAL] 9 | 10 | category: "Configurações", 11 | aliases: ["dautoplay"], 12 | usage: "defaultautoplay", 13 | 14 | cooldown: 10, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | description: "Define se a reprodução automática deve ser habilitada no padrão ou não!", //the command description for helpcmd [OPTIONAL] 16 | memberpermissions: ["MANAGE_GUILD "], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | //things u can directly access in an interaction! 22 | const { 23 | member, 24 | channelId, 25 | guildId, 26 | applicationId, 27 | commandName, 28 | deferred, 29 | replied, 30 | ephemeral, 31 | options, 32 | id, 33 | createdTimestamp 34 | } = message; 35 | const { 36 | guild 37 | } = member; 38 | client.settings.ensure(guild.id, { 39 | defaultvolume: 50, 40 | defaultautoplay: false, 41 | defaultfilters: [`bassboost6`, `clear`] 42 | }); 43 | 44 | client.settings.set(guild.id, !client.settings.get(guild.id, "defaultautoplay"), "defaultautoplay"); 45 | return message.reply({ 46 | embeds: [ 47 | new MessageEmbed() 48 | .setColor(ee.color) 49 | .setFooter(ee.footertext, ee.footericon) 50 | .setTitle(`${client.allEmojis.check_mark} **O Autoplay-Padrão está __\`${client.settings.get(guild.id, "defaultautoplay") ? "Ativado" : "Desativado"}\`__!**`) 51 | ], 52 | }) 53 | } catch (e) { 54 | console.log(String(e.stack).bgRed) 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # King Bot 2 | My first bot for discord, made with the help of the official discord.js library and using node js 3 |
4 |
5 | Active command classes 6 | 7 | | Commands | status 8 | -------- | ------ 9 | Action | ✔ 10 | Fun | ✔ 11 | Games | ✔ 12 | Image | ✔ 13 | Moderation| ✔ 14 | Music | ✔ 15 |
16 | 17 | ## with memes commands 100% Brazilian 18 | ****************** 19 | fun-img
20 | fun-img 21 |
22 | ## image manipulation commands 23 | ****************** 24 | img
25 | img
26 | img 27 |
28 | ## chat-bot 29 | ****************** 30 | img 31 |
32 | ## examples of some utility commands 33 | ****************** 34 | utility-img
35 | utility-img
36 | utility-img 37 |
38 | ## music controller controlled with reactions 39 | ****************** 40 | music-img 41 | 42 | 43 | 44 | 45 | [Add me to your server]( https://discord.com/oauth2/authorize?client_id=794291443454836766&scope=bot&permissions=939942015) -------------------------------------------------------------------------------- /commands/Configurações/prefix.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "prefix", //the command name for execution & for helpcmd [OPTIONAL] 9 | category: "Settings", 10 | aliases: ["setprefix"], 11 | usage: "prefix ", 12 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 13 | description: "Changes the Prefix of the Bot!", //the command description for helpcmd [OPTIONAL] 14 | memberpermissions: ["MANAGE_GUILD "], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 15 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 16 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 17 | 18 | run: async (client, message, args) => { 19 | try { 20 | //things u can directly access in an interaction! 21 | const { 22 | member, 23 | channelId, 24 | guildId, 25 | applicationId, 26 | commandName, 27 | deferred, 28 | replied, 29 | ephemeral, 30 | options, 31 | id, 32 | createdTimestamp 33 | } = message; 34 | const { 35 | guild 36 | } = member; 37 | if (!args[0]) { 38 | return message.reply({ 39 | embeds: [ 40 | new MessageEmbed() 41 | .setColor(ee.wrongcolor) 42 | .setFooter(ee.footertext, ee.footericon) 43 | .setTitle(`${client.allEmojis.x} **Please add a Prefix!**`) 44 | .setDescription(`**Usage:**\n> \`${client.settings.get(guild.id, "prefix")}prefix \``) 45 | ], 46 | }) 47 | } 48 | let newPrefix = args[0]; 49 | client.settings.ensure(guild.id, { 50 | prefix: config.prefix 51 | }); 52 | 53 | client.settings.set(guild.id, newPrefix, "prefix"); 54 | return message.reply({ 55 | embeds: [ 56 | new MessageEmbed() 57 | .setColor(ee.color) 58 | .setFooter(ee.footertext, ee.footericon) 59 | .setTitle(`${client.allEmojis.check_mark} **The new Prefix is now: \`${newPrefix}\`**`) 60 | ], 61 | }) 62 | } catch (e) { 63 | console.log(String(e.stack).bgRed) 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /dashboard/views/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 35 |
36 | 37 | -------------------------------------------------------------------------------- /commands/Diversão/ratewaifu.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "ratewaifu", 3 | aliases: ['waifu', 'avaliarwaifu'], 4 | category:"Diversão", 5 | cooldown: "5", 6 | run:async (client, message, args) => { 7 | 8 | let user = message.mentions.users.first() || client.users.cache.get(args[0]); 9 | 10 | if (!user) { 11 | return message.reply('lembre-se de mencionar um usuário válido para avaliar!'); 12 | } 13 | 14 | if (user == 794291443454836766) return message.reply('Eu dou nota **∞** para <@794291443454836766> sim eu sou muito lindo 😘') 15 | 16 | if(user == 718669518452293713) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut:808443704028823574>`) 17 | 18 | if(user == 772855488756580404) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut:808443704028823574>`) 19 | 20 | if(user == 532413362940936213) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut1:808444488086847538>`) 21 | 22 | if(user == 446123064363712523) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut1:808444488086847538>`) 23 | 24 | if(user == 757434569011232879) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut1:808444488086847538>`) 25 | 26 | if(user == 765113381094817812) return message.reply(`Sobre ${user}... Eu dou nota **1000** para essa waifu. Se vc procurar definição de perfeição no dicionário aparece ${user}! <:cut1:808444488086847538>`) 27 | 28 | var list = [ 29 | '**1** para essa waifu. Eu não gostei <:hm:808446536533934100> ', 30 | '**5** para essa waifu. <:hmmm:779010951420051457> ', 31 | '**7** para essa waifu. Achei ela bonitinha <:cut1:808444488086847538> ', 32 | '**4** para essa waifu. Bonitinha <:hm:808446536533934100>', 33 | '**3** para essa waifu. Bonitinha, mas acho que pode melhorar *na minha opinião* <:hm:808446536533934100>', 34 | '**5** para essa waifu.', 35 | '**8** para essa waifu.', 36 | '**10** para essa waifu. Essa waifu é perfeita! Eu não trocaria ela por nada se fosse você! <:cut:808443704028823574>' 37 | ]; 38 | 39 | var rand = list[Math.floor(Math.random() * list.length)]; 40 | 41 | await message.reply(`Sobre ${user}... Eu dou nota ${rand}`); 42 | } 43 | } -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '30 3 * * 5' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'javascript' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v2 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v1 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v1 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v1 72 | -------------------------------------------------------------------------------- /commands/Song/addend.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "addend", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "addend", 15 | aliases: ["adde", "addfim"], 16 | description: "Adiciona esta música de volta ao final da fila!", //the command description for Slash Command Overview 17 | cooldown: 15, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor Junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Entre no meu Canal de Voz!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 63 | ], 64 | 65 | }) 66 | await client.distube.playVoiceChannel(channel, newQueue.songs[0].url) 67 | } catch (e) { 68 | console.log(e.stack ? e.stack : e) 69 | message.reply({ 70 | content: `${client.allEmojis.x} | Error: `, 71 | embeds: [ 72 | new MessageEmbed().setColor(ee.wrongcolor) 73 | .setDescription(`\`\`\`${e}\`\`\``) 74 | ], 75 | 76 | }) 77 | } 78 | } catch (e) { 79 | console.log(String(e.stack).bgRed) 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /dashboard/public/commands.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); 2 | 3 | 4 | body { 5 | background: #000617; 6 | color: #5663f7 7 | } 8 | h1 { 9 | text-align: center; 10 | } 11 | p { 12 | text-align: center; 13 | } 14 | a { 15 | color: #00BFFF; 16 | text-decoration: none; 17 | transition: all 0.2s ease; 18 | } 19 | a:hover { 20 | color: #00bffd 21 | } 22 | section { 23 | margin-top: 10px; 24 | margin-bottom: 30px; 25 | } 26 | 27 | .command_head { 28 | padding-top: 50px; 29 | padding-bottom: 50px; 30 | color: white; 31 | } 32 | 33 | #category { 34 | border-radius: 5px; 35 | padding-bottom: 50px; 36 | } 37 | 38 | #category a { 39 | background-color: #151f2e; 40 | color: #00bfff; 41 | font-weight: bold; 42 | } 43 | 44 | #category a:focus{ 45 | color: #000617; 46 | background: #00bfff; 47 | } 48 | 49 | #category a:hover{ 50 | color: #000617; 51 | background: #00BFFF; 52 | } 53 | 54 | .allfilters{ 55 | color: #000617!important 56 | } 57 | 58 | #category a.active { 59 | background-color: #00BFFF; 60 | border-color: #00BFFF; 61 | color: #000617; 62 | } 63 | 64 | #category a.active:focus { 65 | background-color: #00BFFF; 66 | border-color: #00BFFF; 67 | } 68 | .accordion-item { 69 | background-color: #151f2e; 70 | color: #888a9b; 71 | } 72 | 73 | .accordion-button { 74 | color: #00BFFF; 75 | font-weight: bold; 76 | } 77 | 78 | .accordion-button:not(.collapsed) { 79 | color: #000617; 80 | background-color: #00BFFF; 81 | } 82 | 83 | .accordion-button:not(.collapsed)::after { 84 | background-image: url(https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-up-01-512.png); 85 | transform: rotate(180deg); 86 | filter: invert(10%) 87 | } 88 | .accordion-button::after { 89 | background-image: url(https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-up-01-512.png); 90 | } */ 91 | 92 | .accordion-button:focus { 93 | z-index: 0; 94 | border-color: transparent; 95 | outline: 0; 96 | box-shadow: 0 0 0 0.25rem transparent; 97 | } 98 | 99 | .accordion-item:first-of-type { 100 | border-top-left-radius: .25rem; 101 | border-top-right-radius: .25rem; 102 | } 103 | 104 | 105 | .accordion-item:last-of-type { 106 | border-bottom-left-radius: .25rem; 107 | border-bottom-right-radius: .25rem; 108 | } 109 | 110 | #commands_menu { 111 | font-family: 'Poppins', sans-serif; 112 | } 113 | 114 | 115 | /* ANIMATION */ 116 | 117 | .slide-up-fade-in{ 118 | animation: slide-up-fade-in ease 1.5s; 119 | } 120 | 121 | @keyframes slide-up-fade-in{ 122 | 0% { 123 | opacity:0; 124 | transform: translate(0px,40px) ; 125 | } 126 | 100% { 127 | opacity:1; 128 | transform: translate(0px,0px) ; 129 | } 130 | } -------------------------------------------------------------------------------- /commands/Configurações/defaultvolume.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "defaultvolume", //the command name for execution & for helpcmd [OPTIONAL] 9 | category: "Configurações", 10 | aliases: ["dvolume"], 11 | usage: "defaultvolume ", 12 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 13 | description: "Define o volume padrão do bot!", //the command description for helpcmd [OPTIONAL] 14 | memberpermissions: ["MANAGE_GUILD "], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 15 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 16 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 17 | run: async (client, message, args) => { 18 | try { 19 | //things u can directly access in an interaction! 20 | const { 21 | member, 22 | channelId, 23 | guildId, 24 | applicationId, 25 | commandName, 26 | deferred, 27 | replied, 28 | ephemeral, 29 | options, 30 | id, 31 | createdTimestamp 32 | } = message; 33 | const { 34 | guild 35 | } = member; 36 | if (!args[0]) { 37 | return message.reply({ 38 | embeds: [ 39 | new MessageEmbed() 40 | .setColor(ee.wrongcolor) 41 | .setFooter(ee.footertext, ee.footericon) 42 | .setTitle(`${client.allEmojis.x} **Por favor adicione um Volume!**`) 43 | .setDescription(`**Use:**\n> \`${client.settings.get(guild.id, "prefix")}defaultvolume \``) 44 | ], 45 | }) 46 | } 47 | let volume = Number(args[0]); 48 | client.settings.ensure(guild.id, { 49 | defaultvolume: 50 50 | }); 51 | 52 | if (!volume || (volume > 150 || volume < 1)) { 53 | return message.reply({ 54 | embeds: [ 55 | new MessageEmbed() 56 | .setColor(ee.wrongcolor) 57 | .setFooter(ee.footertext, ee.footericon) 58 | .setTitle(`${client.allEmojis.x} **O Volume _deve_ estar\`1\` e \`150\`!**`) 59 | ], 60 | }) 61 | } 62 | client.settings.set(guild.id, volume, "defaultvolume"); 63 | return message.reply({ 64 | embeds: [ 65 | new MessageEmbed() 66 | .setColor(ee.color) 67 | .setFooter(ee.footertext, ee.footericon) 68 | .setTitle(`${client.allEmojis.check_mark} **O Volume Padrão foi definido para: \`${volume}\`!**`) 69 | ], 70 | }) 71 | } catch (e) { 72 | console.log(String(e.stack).bgRed) 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /commands/Filtro/list.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const FiltersSettings = require("../../botconfig/filters.json"); 9 | const { 10 | check_if_dj 11 | } = require("../../handlers/functions") 12 | 13 | module.exports = { 14 | name: "filters", //the command name for the Slash Command 15 | 16 | category: "Filtro", 17 | usage: "filters", 18 | aliases: ["listfilter", "listfilters", "allfilters"], 19 | 20 | description: "Liste todos os filtros ativos e possíveis!", //the command description for Slash Command Overview 21 | cooldown: 5, 22 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 23 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 24 | run: async (client, message, args) => { 25 | try { 26 | const { 27 | member, 28 | guildId, 29 | guild 30 | } = message; 31 | const { 32 | channel 33 | } = member.voice; 34 | try { 35 | let newQueue = client.distube.getQueue(guildId); 36 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 37 | embeds: [ 38 | new MessageEmbed() 39 | .setColor(ee.wrongcolor) 40 | .setFooter(ee.footertext, ee.footericon) 41 | .addField("**Todos os filtros disponíveis:**", Object.keys(FiltersSettings).map(f => `\`${f}\``).join(", ") + "\n\n**Nota:**\n> *Todos os filtros, começando com o personalizado, têm seu próprio Comando, use-os para definir o valor personalizado que você deseja!*") 42 | ], 43 | }) 44 | return message.reply({ 45 | embeds: [ 46 | new MessageEmbed() 47 | .setColor(ee.wrongcolor) 48 | .setFooter(ee.footertext, ee.footericon) 49 | .addField("**Todos os filtros disponíveis:**", Object.keys(FiltersSettings).map(f => `\`${f}\``).join(", ") + "\n\n**Nota:**\n> *Todos os filtros, começando com o personalizado, têm seu próprio Comando, use-os para definir o valor personalizado que você deseja!*") 50 | .addField("**Todos os Filtros _disponiveis__:**", newQueue.filters.map(f => `\`${f}\``).join(", ")) 51 | ], 52 | }) 53 | } catch (e) { 54 | console.log(e.stack ? e.stack : e) 55 | message.reply({ 56 | content: `${client.allEmojis.x} | Error: `, 57 | embeds: [ 58 | new MessageEmbed().setColor(ee.wrongcolor) 59 | .setDescription(`\`\`\`${e}\`\`\``) 60 | ], 61 | 62 | }) 63 | } 64 | } catch (e) { 65 | console.log(String(e.stack).bgRed) 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /commands/Utilidade/covid.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const { MessageEmbed } = require('discord.js'); 3 | const ee = require(`../../botconfig/embed.json`); 4 | 5 | module.exports = { 6 | name: "covid", 7 | usage: "covid ", 8 | aliases: ["co", "corona", "coronavirus"], 9 | description: "Receba atualizações de todo o mundo dos casos de covid 19", 10 | category: "utilidade", 11 | run: async (client, message, args) => { 12 | const baseUrl = "https://corona.lmao.ninja/v2"; 13 | 14 | let url, response, corona; 15 | 16 | try { 17 | url = args[0] ? `${baseUrl}/countries/${args[0]}`:`${baseUrl}/all` 18 | response = await axios.get(url) 19 | corona = response.data 20 | } catch (error) { 21 | return message.channel.send(`***${args[0]}*** não existe ou os dados não estão sendo coletados`) 22 | } 23 | 24 | const embed = new MessageEmbed() 25 | .setTitle(args[0] ? `${args[0].toUpperCase()} Estatísticas` : 'Total de casos de Corvid em todo o mundo') 26 | .setColor(ee.color) 27 | .setThumbnail(args[0] ? corona.countryInfo.flag : 'https://media1.giphy.com/media/SxKiUZFgroqSk3evB7/giphy.gif') 28 | .addFields( 29 | { 30 | name: 'Total de casos:', 31 | value: `\`${corona.cases.toLocaleString()}\``, 32 | inline: true 33 | }, 34 | { 35 | name: 'Total de mortes:', 36 | value: `\`${corona.deaths.toLocaleString()}\``, 37 | inline: true 38 | }, 39 | { 40 | name: 'Total de recuperados:', 41 | value: `\`${corona.recovered.toLocaleString()}\``, 42 | inline: true 43 | }, 44 | { 45 | name: 'Casos ativos:', 46 | value: `\`${corona.active.toLocaleString()}\``, 47 | inline: true 48 | }, 49 | { 50 | name: '\u200b', 51 | value: '\u200b', 52 | inline: true 53 | }, 54 | { 55 | name: 'Casos críticos:', 56 | value: `\`${corona.critical.toLocaleString()}\``, 57 | inline: true 58 | }, 59 | { 60 | name: 'Recuperações de hoje:', 61 | value: `\`${corona.todayRecovered.toLocaleString().replace("-", "")}\``, 62 | inline: true 63 | }, 64 | { 65 | name: 'Total de mortes hoje:', 66 | value: `\`${corona.todayDeaths.toLocaleString()}\``, 67 | inline: true 68 | }) 69 | .setFooter(ee.footertext, ee.footericon) 70 | 71 | await message.reply({embeds: [embed]}) 72 | } 73 | }; -------------------------------------------------------------------------------- /handlers/events.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const allevents = []; 3 | module.exports = async (client) => { 4 | try { 5 | try { 6 | const stringlength = 69; 7 | console.log("\n") 8 | console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.brightGreen) 9 | console.log(` ┃ `.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length) + "┃".bold.brightGreen) 10 | console.log(` ┃ `.bold.brightGreen + `Bem-vindo ao MANIPULADOR DE SERVIÇO!`.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length - `Bem-vindo ao MANIPULADOR DE SERVIÇO!`.length) + "┃".bold.brightGreen) 11 | console.log(` ┃ `.bold.brightGreen + ` /-/ /-/`.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length - ` /-/ /-/`.length) + "┃".bold.brightGreen) 12 | console.log(` ┃ `.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length) + "┃".bold.brightGreen) 13 | console.log(` ┃ `.bold.brightGreen + ` /-/ /-/`.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length - ` /-/ /-/`.length) + " ┃".bold.brightGreen) 14 | console.log(` ┃ `.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length) + "┃".bold.brightGreen) 15 | console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.brightGreen) 16 | } catch { 17 | /* */ } 18 | let amount = 0; 19 | const load_dir = (dir) => { 20 | const event_files = fs.readdirSync(`./events/${dir}`).filter((file) => file.endsWith(".js")); 21 | for (const file of event_files) { 22 | try { 23 | const event = require(`../events/${dir}/${file}`) 24 | let eventName = file.split(".")[0]; 25 | allevents.push(eventName); 26 | client.on(eventName, event.bind(null, client)); 27 | amount++; 28 | } catch (e) { 29 | console.log(e) 30 | } 31 | } 32 | } 33 | await ["client", "guild"].forEach(e => load_dir(e)); 34 | console.log(`${amount} Eventos carregados`.brightGreen); 35 | try { 36 | const stringlength2 = 69; 37 | console.log("\n") 38 | console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.yellow) 39 | console.log(` ┃ `.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length) + "┃".bold.yellow) 40 | console.log(` ┃ `.bold.yellow + `Logando no bot...`.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length - `Logando no bot...`.length) + "┃".bold.yellow) 41 | console.log(` ┃ `.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length) + "┃".bold.yellow) 42 | console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.yellow) 43 | } catch { 44 | /* */ } 45 | } catch (e) { 46 | console.log(String(e.stack).bgRed) 47 | } 48 | }; -------------------------------------------------------------------------------- /commands/Configurações/defaultfilter.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | const filters = require("../../botconfig/filters.json") 8 | module.exports = { 9 | name: "defaultfilter", //the command name for execution & for helpcmd [OPTIONAL] 10 | category: "Configurações", 11 | 12 | aliases: ["dfilter"], 13 | usage: "defaultfilter ", 14 | cooldown: 10, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | usage: "defaultfilter", //the command usage for helpcmd [OPTIONAL] 16 | description: "Define o(s) filtro(s) padrão", //the command description for helpcmd [OPTIONAL] 17 | memberpermissions: ["MANAGE_GUILD "], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL], //Only allow specific Users to execute a Command [OPTIONAL] 20 | 21 | run: async (client, message, args) => { 22 | try { 23 | //things u can directly access in an interaction! 24 | const { 25 | member, 26 | channelId, 27 | guildId, 28 | applicationId, 29 | commandName, 30 | deferred, 31 | replied, 32 | ephemeral, 33 | options, 34 | id, 35 | createdTimestamp 36 | } = message; 37 | const { 38 | guild 39 | } = member; 40 | client.settings.ensure(guild.id, { 41 | defaultvolume: 50, 42 | defaultautoplay: false, 43 | defaultfilters: [`bassboost6`, `clear`] 44 | }); 45 | if (args.some(a => !filters[a])) { 46 | return message.reply({ 47 | embeds: [ 48 | new MessageEmbed() 49 | .setColor(ee.wrongcolor) 50 | .setFooter(ee.footertext, ee.footericon) 51 | .setTitle(`${client.allEmojis.x} **You added at least one Filter, which is invalid!**`) 52 | .setDescription("**To define Multiple Filters add a SPACE (` `) in between!**") 53 | .addField("**All Valid Filters:**", Object.keys(filters).map(f => `\`${f}\``).join(", ")) 54 | ], 55 | }) 56 | } 57 | 58 | client.settings.set(guild.id, args, "defaultfilters"); 59 | return message.reply({ 60 | embeds: [ 61 | new MessageEmbed() 62 | .setColor(ee.color) 63 | .setFooter(ee.footertext, ee.footericon) 64 | .setTitle(`${client.allEmojis.check_mark} **The new Default-Filter${args.length > 0 ? "s are": " is"}:**`) 65 | .setDescription(`${args.map(a=>`\`${a}\``).join(", ")}`) 66 | ], 67 | }) 68 | } catch (e) { 69 | console.log(String(e.stack).bgRed) 70 | } 71 | } 72 | } 73 | /** 74 | * @INFO 75 | * Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template 76 | * @INFO 77 | * Work for Milrato Development | https://milrato.eu 78 | * @INFO 79 | * Please mention Him / Milrato Development, when using this Code! 80 | * @INFO 81 | */ 82 | -------------------------------------------------------------------------------- /commands/Filtro/clear.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "clear", //the command name for the Slash Command 13 | 14 | category: "Filtro", 15 | usage: "clear", 16 | aliases: ["clearfilters", "clearf", "cfilters", "cfilter", "clearfilter"], 17 | 18 | description: "Limpa todos os filtros", //the command description for Slash Command Overview 19 | cooldown: 5, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | const { 25 | member, 26 | guildId, 27 | guild 28 | } = message; 29 | const { 30 | channel 31 | } = member.voice; 32 | if (!channel) return message.reply({ 33 | embeds: [ 34 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 35 | ], 36 | 37 | }) 38 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 39 | return message.reply({ 40 | embeds: [new MessageEmbed() 41 | .setColor(ee.wrongcolor) 42 | .setFooter(ee.footertext, ee.footericon) 43 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de voz primeiro!`) 44 | .setDescription(`<#${guild.me.voice.channel.id}>`) 45 | ], 46 | }); 47 | } 48 | try { 49 | let newQueue = client.distube.getQueue(guildId); 50 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 51 | embeds: [ 52 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora**`) 53 | ], 54 | 55 | }) 56 | if (check_if_dj(client, member, newQueue.songs[0])) { 57 | return message.reply({ 58 | embeds: [new MessageEmbed() 59 | .setColor(ee.wrongcolor) 60 | .setFooter(ee.footertext, ee.footericon) 61 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e não é o Song Requester!**`) 62 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 63 | ], 64 | }); 65 | } 66 | await newQueue.setFilter(false); 67 | message.reply({ 68 | embeds: [new MessageEmbed() 69 | .setColor(ee.color) 70 | .setTimestamp() 71 | .setTitle(`🗑 **Todos os filtros foram apagados!**`) 72 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 73 | }) 74 | } catch (e) { 75 | console.log(e.stack ? e.stack : e) 76 | message.reply({ 77 | content: `${client.allEmojis.x} | Error: `, 78 | embeds: [ 79 | new MessageEmbed().setColor(ee.wrongcolor) 80 | .setDescription(`\`\`\`${e}\`\`\``) 81 | ], 82 | 83 | }) 84 | } 85 | } catch (e) { 86 | console.log(String(e.stack).bgRed) 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /commands/Musica/addrelated.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | module.exports = { 9 | name: "addrelated", //the command name for the Slash Command 10 | category: "Musica", 11 | usage: "addrelated", 12 | aliases: ["semelhante", "igual", "addigual"], 13 | description: "Adicione uma música semelhante / relacionada à música atual!", //the command description for Slash Command Overview 14 | cooldown: 2, 15 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 16 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL 17 | run: async (client, message, args) => { 18 | try { 19 | //things u can directly access in an interaction! 20 | const { 21 | member, 22 | channelId, 23 | guildId, 24 | applicationId, 25 | commandName, 26 | deferred, 27 | replied, 28 | ephemeral, 29 | options, 30 | id, 31 | createdTimestamp 32 | } = message; 33 | const { 34 | guild 35 | } = member; 36 | const { 37 | channel 38 | } = member.voice; 39 | if (!channel) return message.reply({ 40 | embeds: [ 41 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Junte-se ${guild.me.voice.channel? "__ao meu__": "a um"} canal de voz primeiro!**`) 42 | ], 43 | 44 | }) 45 | if (channel.userLimit != 0 && channel.full) 46 | return message.reply({ 47 | embeds: [new MessageEmbed() 48 | .setColor(ee.wrongcolor) 49 | .setFooter(ee.footertext, ee.footericon) 50 | .setTitle(`<:declined:780403017160982538> Seu canal de voz está cheio, não consigo entrar!`) 51 | ], 52 | }); 53 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 54 | return message.reply({ 55 | embeds: [new MessageEmbed() 56 | .setColor(ee.wrongcolor) 57 | .setFooter(ee.footertext, ee.footericon) 58 | .setTitle(`<:declined:780403017160982538> Já estou conectado em outro lugar`) 59 | ], 60 | }); 61 | } 62 | try { 63 | let newQueue = client.distube.getQueue(guildId); 64 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 65 | embeds: [ 66 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não esto tocando nada agora**`) 67 | ], 68 | }) 69 | //update it without a response! 70 | let thenewmsg = await message.reply({ 71 | content: `🔍 Procurando música relacionada por... **${newQueue.songs[0].name}**`, 72 | }).catch(e => { 73 | console.log(e) 74 | }) 75 | await newQueue.addRelatedSong(); 76 | await thenewmsg.edit({ 77 | content: `👍 Adicionado: **${newQueue.songs[newQueue.songs.length - 1].name}**`, 78 | }).catch(e => { 79 | console.log(e) 80 | }) 81 | } catch (e) { 82 | console.log(e.stack ? e.stack : e) 83 | message.reply({ 84 | content: `${client.allEmojis.x} | Error: `, 85 | embeds: [ 86 | new MessageEmbed().setColor(ee.wrongcolor) 87 | .setDescription(`\`\`\`${e}\`\`\``) 88 | ], 89 | 90 | }) 91 | } 92 | } catch (e) { 93 | console.log(String(e.stack).bgRed) 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const config = require(`./botconfig/config.json`); 3 | const settings = require(`./botconfig/settings.json`); 4 | const filters = require(`./botconfig/filters.json`); 5 | const colors = require("colors"); 6 | const Enmap = require("enmap"); 7 | const libsodium = require("libsodium-wrappers"); 8 | const ffmpeg = require("ffmpeg-static"); 9 | const voice = require("@discordjs/voice"); 10 | const DisTube = require("distube").default; 11 | const https = require('https-proxy-agent'); 12 | const client = new Discord.Client({ 13 | restTimeOffset: 0, 14 | shards: "auto", 15 | allowedMentions: { 16 | parse: [ ], 17 | repliedUser: false, 18 | }, 19 | partials: ['MESSAGE', 'CHANNEL', 'REACTION'], 20 | intents: [ 21 | Discord.Intents.FLAGS.GUILDS, 22 | Discord.Intents.FLAGS.GUILD_MESSAGES, 23 | Discord.Intents.FLAGS.GUILD_VOICE_STATES, 24 | ] 25 | }); 26 | const proxy = 'http://123.123.123.123:8080'; 27 | const agent = https(proxy); 28 | const { SpotifyPlugin } = require("@distube/spotify"); 29 | const { SoundCloudPlugin } = require("@distube/soundcloud"); 30 | let spotifyoptions = { 31 | parallel: true, 32 | emitEventsAfterFetching: true, 33 | } 34 | if(config.spotify_api.enabled){ 35 | spotifyoptions.api = { 36 | clientId: config.spotify_api.clientId, 37 | clientSecret: config.spotify_api.clientSecret, 38 | } 39 | } 40 | client.distube = new DisTube(client, { 41 | emitNewSongOnly: false, 42 | leaveOnEmpty: true, 43 | leaveOnFinish: true, 44 | leaveOnStop: true, 45 | savePreviousSongs: true, 46 | emitAddSongWhenCreatingQueue: false, 47 | //emitAddListWhenCreatingQueue: false, 48 | searchSongs: 0, 49 | youtubeCookie: config.youtubeCookie, //Comment this line if you dont want to use a youtube Cookie 50 | nsfw: true, //Set it to false if u want to disable nsfw songs 51 | emptyCooldown: 25, 52 | ytdlOptions: { 53 | //requestOptions: { 54 | // agent //ONLY USE ONE IF YOU KNOW WHAT YOU DO! 55 | //}, 56 | highWaterMark: 1024 * 1024 * 64, 57 | quality: "highestaudio", 58 | format: "audioonly", 59 | liveBuffer: 60000, 60 | dlChunkSize: 1024 * 1024 * 64, 61 | }, 62 | youtubeDL: true, 63 | updateYouTubeDL: true, 64 | customFilters: filters, 65 | plugins: [ 66 | new SpotifyPlugin(spotifyoptions), 67 | new SoundCloudPlugin() 68 | ] 69 | }) 70 | 71 | //Define some Global Collections 72 | client.commands = new Discord.Collection(); 73 | client.cooldowns = new Discord.Collection(); 74 | client.slashCommands = new Discord.Collection(); 75 | client.aliases = new Discord.Collection(); 76 | client.categories = require("fs").readdirSync(`./commands`); 77 | client.allEmojis = require("./botconfig/emojis.json"); 78 | 79 | client.setMaxListeners(100); require('events').defaultMaxListeners = 100; 80 | 81 | client.settings = new Enmap({ name: "settings",dataDir: "./databases/settings"}); 82 | client.infos = new Enmap({ name: "infos", dataDir: "./databases/infos"}); 83 | 84 | 85 | //Require the Handlers Add the antiCrash file too, if its enabled 86 | ["events", "commands", "slashCommands", settings.antiCrash ? "antiCrash" : null, "distubeEvent"] 87 | .filter(Boolean) 88 | .forEach(h => { 89 | require(`./handlers/${h}`)(client); 90 | })|| config.token 91 | //Start the Bot 92 | client.login(process.env.token || config.token) 93 | client.on("ready", () => { 94 | require("./dashboard/index.js")(client); 95 | }) 96 | -------------------------------------------------------------------------------- /commands/Musica/skip.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "skip", //the command name for the Slash Command 13 | 14 | category: "Musica", 15 | aliases: ["s", "proximo", "pular"], 16 | usage: "skip", 17 | 18 | description: "Pula a faixa atual", //the command description for Slash Command Overview 19 | cooldown: 5, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "ao meu" : "a um"} Canal de voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 65 | ], 66 | }) 67 | if (check_if_dj(client, member, newQueue.songs[0])) { 68 | return message.reply({ 69 | embeds: [new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 73 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 74 | ], 75 | }); 76 | } 77 | await newQueue.skip(); 78 | message.reply({ 79 | embeds: [new MessageEmbed() 80 | .setColor(ee.color) 81 | .setTimestamp() 82 | .setTitle(`⏭ **Pulei para a próxima música!**`) 83 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 84 | }) 85 | } catch (e) { 86 | console.log(e.stack ? e.stack : e) 87 | message.reply({ 88 | content: `${client.allEmojis.x} | Error: `, 89 | embeds: [ 90 | new MessageEmbed().setColor(ee.wrongcolor) 91 | .setDescription(`\`\`\`${e}\`\`\``) 92 | ], 93 | 94 | }) 95 | } 96 | } catch (e) { 97 | console.log(String(e.stack).bgRed) 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /commands/Song/replay.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "replay", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "replay", 15 | aliases: ["restart", "repetir"], 16 | description: "Repete a música atual!", //the command description for Slash Command Overview 17 | cooldown: 10, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 63 | ], 64 | 65 | }) 66 | let seekNumber = 0 67 | if (check_if_dj(client, member, newQueue.songs[0])) { 68 | return message.reply({ 69 | embeds: [new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 73 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 74 | ], 75 | }); 76 | } 77 | await newQueue.seek(seekNumber); 78 | message.reply({ 79 | embeds: [new MessageEmbed() 80 | .setColor(ee.color) 81 | .setTimestamp() 82 | .setTitle(`🔃 **Repetindo a música atual!**`) 83 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 84 | }) 85 | } catch (e) { 86 | console.log(e.stack ? e.stack : e) 87 | message.reply({ 88 | content: `${client.allEmojis.x} | Error: `, 89 | embeds: [ 90 | new MessageEmbed().setColor(ee.wrongcolor) 91 | .setDescription(`\`\`\`${e}\`\`\``) 92 | ], 93 | 94 | }) 95 | } 96 | } catch (e) { 97 | console.log(String(e.stack).bgRed) 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /commands/Fila/shuffle.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "shuffle", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["mix", "embaralhar", "misturar"], 16 | usage: "shuffle", 17 | 18 | description: "Embaralha (mistura) a fila", //the command description for Slash Command Overview 19 | cooldown: 10, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor Junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no meu canal de voz!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 65 | ], 66 | 67 | }) 68 | if (check_if_dj(client, member, newQueue.songs[0])) { 69 | return message.reply({ 70 | embeds: [new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 74 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 75 | ], 76 | }); 77 | } 78 | await newQueue.shuffle(); 79 | message.reply({ 80 | embeds: [new MessageEmbed() 81 | .setColor(ee.color) 82 | .setTimestamp() 83 | .setTitle(`🔀 **Embaralhou ${newQueue.songs.length} Músicas!**`) 84 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 85 | }) 86 | } catch (e) { 87 | console.log(e.stack ? e.stack : e) 88 | message.reply({ 89 | content: `${client.allEmojis.x} | Error: `, 90 | embeds: [ 91 | new MessageEmbed().setColor(ee.wrongcolor) 92 | .setDescription(`\`\`\`${e}\`\`\``) 93 | ], 94 | 95 | }) 96 | } 97 | } catch (e) { 98 | console.log(String(e.stack).bgRed) 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /commands/Musica/autoplay.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "autoplay", //the command name for the Slash Command 13 | 14 | category: "Musica", 15 | aliases: ["ap"], 16 | usage: "autoplay", 17 | 18 | description: "Alterna a reprodução automática", //the command description for Slash Command Overview 19 | cooldown: 5, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "ao meu" : "a um"} canal de voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Junte-se ao __meu__ canal de voz de!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 65 | ], 66 | }) 67 | if (check_if_dj(client, member, newQueue.songs[0])) { 68 | return message.reply({ 69 | embeds: [new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 73 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 74 | ], 75 | }); 76 | } 77 | await newQueue.toggleAutoplay(); 78 | message.reply({ 79 | embeds: [new MessageEmbed() 80 | .setColor(ee.color) 81 | .setTimestamp() 82 | .setTitle(`**${newQueue.autoplay ? `${client.allEmojis.check_mark} Habilitado` :`${client.allEmojis.x} Desabilitado`} Autoplay!**`) 83 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 84 | }) 85 | } catch (e) { 86 | console.log(e.stack ? e.stack : e) 87 | message.reply({ 88 | content: `${client.allEmojis.x} | Error: `, 89 | embeds: [ 90 | new MessageEmbed().setColor(ee.wrongcolor) 91 | .setDescription(`\`\`\`${e}\`\`\``) 92 | ], 93 | 94 | }) 95 | } 96 | } catch (e) { 97 | console.log(String(e.stack).bgRed) 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /commands/Fila/clear.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "clear", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["clearqueue", "clearq", "clearqu", "limparfila"], 16 | usage: "clear", 17 | 18 | description: "Limpa a fila", //the command description for Slash Command Overview 19 | cooldown: 10, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de Voz!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 65 | ], 66 | 67 | }) 68 | if (check_if_dj(client, member, newQueue.songs[0])) { 69 | return message.reply({ 70 | embeds: [new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 74 | .setDescription(`**CARGOS-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 75 | ], 76 | }); 77 | } 78 | let amount = newQueue.songs.length - 2; 79 | newQueue.songs = [newQueue.songs[0]]; 80 | message.reply({ 81 | embeds: [new MessageEmbed() 82 | .setColor(ee.color) 83 | .setTimestamp() 84 | .setTitle(`🗑 **Limpou a fila e excluiu ${amount} Músicas!**`) 85 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 86 | }) 87 | } catch (e) { 88 | console.log(e.stack ? e.stack : e) 89 | message.reply({ 90 | content: `${client.allEmojis.x} | Error: `, 91 | embeds: [ 92 | new MessageEmbed().setColor(ee.wrongcolor) 93 | .setDescription(`\`\`\`${e}\`\`\``) 94 | ], 95 | 96 | }) 97 | } 98 | } catch (e) { 99 | console.log(String(e.stack).bgRed) 100 | } 101 | } 102 | } -------------------------------------------------------------------------------- /commands/Musica/stop.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "stop", //the command name for the Slash Command 13 | 14 | category: "Musica", 15 | aliases: ["leave", "break", "destroy", "dis", "disconnect", "parar"], 16 | usage: "stop", 17 | 18 | description: "Para de tocar e sai do canal!", //the command description for Slash Command Overview 19 | cooldown: 5, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "ao meu" : "a um"} Canal de voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if(!newQueue) 63 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 64 | embeds: [ 65 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 66 | ], 67 | }) 68 | if (check_if_dj(client, member, newQueue.songs[0])) { 69 | return message.reply({ 70 | embeds: [new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 74 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 75 | ], 76 | }); 77 | } 78 | await newQueue.stop() 79 | //Reply with a Message 80 | message.reply({ 81 | embeds: [new MessageEmbed() 82 | .setColor(ee.color) 83 | .setTimestamp() 84 | .setTitle(`⏹ **Parou de tocar e saiu do canal!**`) 85 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 86 | }) 87 | return 88 | } catch (e) { 89 | console.log(e.stack ? e.stack : e) 90 | message.reply({ 91 | content: `${client.allEmojis.x} | Error: `, 92 | embeds: [ 93 | new MessageEmbed().setColor(ee.wrongcolor) 94 | .setDescription(`\`\`\`${e}\`\`\``) 95 | ], 96 | 97 | }) 98 | } 99 | } catch (e) { 100 | console.log(String(e.stack).bgRed) 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /commands/Fila/previous.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "previous", //the command name for the Slash Command 13 | category: "Fila", 14 | aliases: ["pre"], 15 | usage: "previous", 16 | 17 | description: "Toca a música anterior!", //the command description for Slash Command Overview 18 | cooldown: 10, 19 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 20 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 21 | run: async (client, message, args) => { 22 | try { 23 | //things u can directly access in an interaction! 24 | const { 25 | member, 26 | channelId, 27 | guildId, 28 | applicationId, 29 | commandName, 30 | deferred, 31 | replied, 32 | ephemeral, 33 | options, 34 | id, 35 | createdTimestamp 36 | } = message; 37 | const { 38 | guild 39 | } = member; 40 | const { 41 | channel 42 | } = member.voice; 43 | if (!channel) return message.reply({ 44 | embeds: [ 45 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 46 | ], 47 | 48 | }) 49 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 50 | return message.reply({ 51 | embeds: [new MessageEmbed() 52 | .setColor(ee.wrongcolor) 53 | .setFooter(ee.footertext, ee.footericon) 54 | .setTitle(`${client.allEmojis.x} Entre no meu Canal!`) 55 | .setDescription(`<#${guild.me.voice.channel.id}>`) 56 | ], 57 | }); 58 | } 59 | try { 60 | let newQueue = client.distube.getQueue(guildId); 61 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 62 | embeds: [ 63 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 64 | ], 65 | 66 | }) 67 | if (!newQueue || !newQueue.previousSongs || newQueue.previousSongs.length == 0) return message.reply({ 68 | embeds: [ 69 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Não há músicas anteriores!**`) 70 | ], 71 | 72 | }) 73 | if (check_if_dj(client, member, newQueue.songs[0])) { 74 | return message.reply({ 75 | embeds: [new MessageEmbed() 76 | .setColor(ee.wrongcolor) 77 | .setFooter(ee.footertext, ee.footericon) 78 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 79 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 80 | ], 81 | }); 82 | } 83 | await newQueue.previous(); 84 | message.reply({ 85 | embeds: [new MessageEmbed() 86 | .setColor(ee.color) 87 | .setTimestamp() 88 | .setTitle(`▶️ **Tocando agora a faixa anterior!**`) 89 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 90 | }) 91 | } catch (e) { 92 | console.log(e.stack ? e.stack : e) 93 | message.reply({ 94 | content: `${client.allEmojis.x} | Error: `, 95 | embeds: [ 96 | new MessageEmbed().setColor(ee.wrongcolor) 97 | .setDescription(`\`\`\`${e}\`\`\``) 98 | ], 99 | 100 | }) 101 | } 102 | } catch (e) { 103 | console.log(String(e.stack).bgRed) 104 | } 105 | } 106 | } -------------------------------------------------------------------------------- /commands/Song/lyrics.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const { 6 | KSoftClient 7 | } = require('@ksoft/api'); 8 | const config = require(`../../botconfig/config.json`); 9 | const ksoft = new KSoftClient(config.ksoftapi); 10 | const ee = require("../../botconfig/embed.json"); 11 | const settings = require("../../botconfig/settings.json"); 12 | const { 13 | lyricsEmbed, 14 | check_if_dj 15 | } = require("../../handlers/functions"); 16 | module.exports = { 17 | name: "lyrics", //the command name for the Slash Command 18 | category: "Song", 19 | usage: "lyrics", 20 | aliases: ["ly", "songtext", "letra"], 21 | description: "Envia a letra da música", //the command description for Slash Command Overview 22 | cooldown: 25, 23 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 24 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 25 | run: async (client, message, args) => { 26 | try { 27 | //things u can directly access in an interaction! 28 | const { 29 | member, 30 | channelId, 31 | guildId, 32 | applicationId, 33 | commandName, 34 | deferred, 35 | replied, 36 | ephemeral, 37 | options, 38 | id, 39 | createdTimestamp 40 | } = message; 41 | const { 42 | guild 43 | } = member; 44 | const { 45 | channel 46 | } = member.voice; 47 | if (!channel) return message.reply({ 48 | embeds: [ 49 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 50 | ], 51 | 52 | }) 53 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 54 | return message.reply({ 55 | embeds: [new MessageEmbed() 56 | .setColor(ee.wrongcolor) 57 | .setFooter(ee.footertext, ee.footericon) 58 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 59 | .setDescription(`<#${guild.me.voice.channel.id}>`) 60 | ], 61 | }); 62 | } 63 | try { 64 | let newQueue = client.distube.getQueue(guildId); 65 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 66 | embeds: [ 67 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 68 | ], 69 | 70 | }) 71 | return message.reply({ 72 | embeds: [new MessageEmbed() 73 | .setColor(ee.wrongcolor) 74 | .setFooter(ee.footertext, ee.footericon) 75 | .setTitle(`${client.allEmojis.x} As letras estão desabilitadas!`) 76 | .setDescription(`**Devido a motivos legais, as letras estão desativadas e não funcionarão por um período de tempo indeterminado!** :cry:`) 77 | ], 78 | }); 79 | let embeds = []; 80 | await ksoft.lyrics.get(newQueue.songs[0].name).then( 81 | async track => { 82 | if (!track.lyrics) return message.reply({ 83 | content: `${client.allEmojis.x} **Nenhuma letra encontrada!** :cry:`, 84 | }); 85 | lyrics = track.lyrics; 86 | embeds = lyricsEmbed(lyrics, newQueue.songs[0]); 87 | }).catch(e => { 88 | console.log(e) 89 | return message.reply({ 90 | content: `${client.allEmojis.x} **Nenhuma letra encontrada!** :cry:\n${String(e).substr(0, 1800)}`, 91 | }); 92 | }) 93 | message.reply({ 94 | embeds: embeds, 95 | }) 96 | } catch (e) { 97 | console.log(e.stack ? e.stack : e) 98 | message.reply({ 99 | content: `${client.allEmojis.x} | Error: `, 100 | embeds: [ 101 | new MessageEmbed().setColor(ee.wrongcolor) 102 | .setDescription(`\`\`\`${e}\`\`\``) 103 | ], 104 | 105 | }) 106 | } 107 | } catch (e) { 108 | console.log(String(e.stack).bgRed) 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /commands/Musica/play.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | module.exports = { 9 | name: "play", //the command name for the Slash Command 10 | 11 | category: "Musica", 12 | aliases: ["p", "pley", "tocar"], 13 | usage: "play ", 14 | 15 | description: "Toca uma música / lista de reprodução em seu canal de voz", //the command description for Slash Command Overview 16 | cooldown: 2, 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | //console.log(interaction, StringOption) 22 | 23 | //things u can directly access in an interaction! 24 | const { 25 | member, 26 | channelId, 27 | guildId, 28 | applicationId, 29 | commandName, 30 | deferred, 31 | replied, 32 | ephemeral, 33 | options, 34 | id, 35 | createdTimestamp 36 | } = message; 37 | const { 38 | guild 39 | } = member; 40 | const { 41 | channel 42 | } = member.voice; 43 | if (!channel) return message.reply({ 44 | embeds: [ 45 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor entre em ${guild.me.voice.channel ? "__meu__" : "um"} canal de voz primeiro!**`) 46 | ], 47 | 48 | }) 49 | if (channel.userLimit != 0 && channel.full) 50 | return message.reply({ 51 | embeds: [new MessageEmbed() 52 | .setColor(ee.wrongcolor) 53 | .setFooter(ee.footertext, ee.footericon) 54 | .setTitle(` Seu canal de voz está cheio, não consigo entrar!`) 55 | ], 56 | }); 57 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 58 | return message.reply({ 59 | embeds: [new MessageEmbed() 60 | .setColor(ee.wrongcolor) 61 | .setFooter(ee.footertext, ee.footericon) 62 | .setTitle(` Já estou conectado em outro lugar`) 63 | ], 64 | }); 65 | } 66 | if (!args[0]) { 67 | return message.reply({ 68 | embeds: [new MessageEmbed() 69 | .setColor(ee.wrongcolor) 70 | .setFooter(ee.footertext, ee.footericon) 71 | .setTitle(`${client.allEmojis.x} **Por favor adicione uma consulta de pesquisa!**`) 72 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}play \``) 73 | ], 74 | }); 75 | } 76 | //let IntOption = options.getInteger("OPTIONNAME"); //same as in IntChoices //RETURNS NUMBER 77 | const Text = args.join(" ") //same as in StringChoices //RETURNS STRING 78 | //update it without a response! 79 | let newmsg = await message.reply({ 80 | content: `🔍 Procurando... \`\`\`${Text}\`\`\``, 81 | }).catch(e => { 82 | console.log(e) 83 | }) 84 | try { 85 | let queue = client.distube.getQueue(guildId) 86 | let options = { 87 | member: member, 88 | } 89 | if (!queue) options.textChannel = guild.channels.cache.get(channelId) 90 | await client.distube.playVoiceChannel(channel, Text, options) 91 | //Edit the reply 92 | newmsg.edit({ 93 | content: `${queue.songs.length > 0 ? "👍 Adicionado" : "🎶 Tocando agora"}: \`\`\`css\n${Text}\n\`\`\``, 94 | }).catch(e => { 95 | console.log(e) 96 | }) 97 | } catch (e) { 98 | console.log(e.stack ? e.stack : e) 99 | message.reply({ 100 | content: `${client.allEmojis.x} | Error: `, 101 | embeds: [ 102 | new MessageEmbed().setColor(ee.wrongcolor) 103 | .setDescription(`\`\`\`${e}\`\`\``) 104 | ], 105 | 106 | }) 107 | } 108 | } catch (e) { 109 | console.log(String(e.stack).bgRed) 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /dashboard/views/queuedashboard.ejs: -------------------------------------------------------------------------------- 1 | <%- include('header'); -%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= bot.name %> 11 | 12 | 13 | 14 | 15 | 16 |
17 | <% if(user && user.guilds && user.guilds.filter((guild) => botClient.guilds.cache.get(guild.id)).length > 0){ %> 18 |
19 |

Servidores em que ambos estamos

20 |
21 |
22 |

Esses servidores são ordenados, após o comprimento da fila, o servidor com a maior fila está à esquerda!

23 |
24 |
25 | <% 26 | user.guilds 27 | .filter((guild) => botClient.guilds.cache.get(guild.id)) 28 | .sort((a, b) => { 29 | let x = botClient.distube.getQueue(a.id) ? botClient.distube.getQueue(a.id).songs.length : 0 30 | let y = botClient.distube.getQueue(a.id) ? botClient.distube.getQueue(a.id).songs.length : 0 31 | return y - x || -1 32 | }) 33 | .forEach(guild => { 34 | %> 35 |
36 | <%- guild.icon ? `` : `` %> 37 |
38 |
<%= guild.name %>
39 |

Mostrar a fila atual de <%= guild.name %> com <%= botClient.distube.getQueue(guild.id) ? botClient.distube.getQueue(guild.id).songs.length : 0 %> Músicas!

40 | 43 | Mostrar fila 44 | 45 | 46 |
47 |
48 | <% }); 49 | %> 50 |
51 | <% }else { 52 | %> 53 |

Nós não compartilhamos nenhum servidor ;(

54 |

55 | 59 |

60 |
61 | <% 62 | } %> 63 |
64 | 65 | 66 | <%- include('footer') -%> 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /dashboard/views/dashboard.ejs: -------------------------------------------------------------------------------- 1 | <%- include('header'); -%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= bot.name %> 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

DASHBOARD

19 |
20 |
21 |

Com o painel, você pode gerenciar as configurações de cada guilda individualmente!
Somente se você tiver a permissão Gerenciar servidor, porque ela é necessária para esse comando!

22 |
23 | <% if(user && user.id){ %> 24 |
25 | <% user.guilds 26 | .filter((guild) => { 27 | const permsOnGuild = new Permissions(guild.permissions_new); 28 | if(permsOnGuild.has(Permissions.FLAGS.MANAGE_GUILD)) return guild; 29 | }) 30 | .sort((a, b) => { 31 | return (botClient.guilds.cache.get(a.id) === botClient.guilds.cache.get(b.id)) ? 0 : a ? -1 : 1; 32 | }) 33 | .forEach(guild => { 34 | %> 35 |
36 | <%- guild.icon ? `` : `` %> 37 |
38 |
<%= guild.name %>
39 | <% if (botClient.guilds.cache.get(guild.id)) { %> 40 |

Edite as configurações de <%= guild.name %> Através do painel clicando no botão abaixo!

41 | Editar Configurações 44 | <% } else { %> 45 |

Me adicione a <% = guild.name%> para ver as configurações de sua guilda através do painel clicando no botão abaixo!

46 | Adicionar Bot 49 | <% } %> 50 |
51 |
52 | <% 53 | }); 54 | %> 55 |
56 | <% 57 | } else { 58 | %> 59 |

Please login First!

60 | <% 61 | } 62 | %> 63 |
64 | 65 | <%- include('footer'); -%> 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /commands/Song/rewind.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "rewind", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "rewind ", 15 | aliases: ["rwd", "retroceder"], 16 | description: "Retrocede por X segundos", //the command description for Slash Command Overview 17 | cooldown: 10, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 63 | ], 64 | 65 | }) 66 | if (!args[0]) { 67 | return message.reply({ 68 | embeds: [ 69 | new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Adicione uma duração de retrocesso!**`) 73 | .setDescription(`**Use:**\n> \`${client.settings.get(guild.id, "prefix")}rewind \``) 74 | ], 75 | }) 76 | } 77 | let seekNumber = Number(args[0]) 78 | let seektime = newQueue.currentTime - seekNumber; 79 | if (seektime < 0) seektime = 0; 80 | if (seektime >= newQueue.songs[0].duration - newQueue.currentTime) seektime = 0; 81 | if (check_if_dj(client, member, newQueue.songs[0])) { 82 | return message.reply({ 83 | embeds: [new MessageEmbed() 84 | .setColor(ee.wrongcolor) 85 | .setFooter(ee.footertext, ee.footericon) 86 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 87 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 88 | ], 89 | }); 90 | } 91 | await newQueue.seek(seektime); 92 | message.reply({ 93 | embeds: [new MessageEmbed() 94 | .setColor(ee.color) 95 | .setTimestamp() 96 | .setTitle(`⏩ **Rebobinou a música para \`${seekNumber} Segundos\`!**`) 97 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 98 | }) 99 | } catch (e) { 100 | console.log(e.stack ? e.stack : e) 101 | message.reply({ 102 | content: `${client.allEmojis.x} | Error: `, 103 | embeds: [ 104 | new MessageEmbed().setColor(ee.wrongcolor) 105 | .setDescription(`\`\`\`${e}\`\`\``) 106 | ], 107 | 108 | }) 109 | } 110 | } catch (e) { 111 | console.log(String(e.stack).bgRed) 112 | } 113 | } 114 | } -------------------------------------------------------------------------------- /commands/Fila/volume.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "volume", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["vol"], 16 | usage: "volume <80>", 17 | 18 | description: "Ajusta o volume da música", //the command description for Slash Command Overview 19 | cooldown: 10, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | 23 | run: async (client, message, args) => { 24 | try { 25 | //things u can directly access in an interaction! 26 | const { 27 | member, 28 | channelId, 29 | guildId, 30 | applicationId, 31 | commandName, 32 | deferred, 33 | replied, 34 | ephemeral, 35 | options, 36 | id, 37 | createdTimestamp 38 | } = message; 39 | const { 40 | guild 41 | } = member; 42 | const { 43 | channel 44 | } = member.voice; 45 | if (!channel) return message.reply({ 46 | embeds: [ 47 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um "} Canal de Voz primeiro!**`) 48 | ], 49 | 50 | }) 51 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 52 | return message.reply({ 53 | embeds: [new MessageEmbed() 54 | .setColor(ee.wrongcolor) 55 | .setFooter(ee.footertext, ee.footericon) 56 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de voz!`) 57 | .setDescription(`<#${guild.me.voice.channel.id}>`) 58 | ], 59 | }); 60 | } 61 | try { 62 | let newQueue = client.distube.getQueue(guildId); 63 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 64 | embeds: [ 65 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu n~so estou tocando nada agora!**`) 66 | ], 67 | 68 | }) 69 | if (check_if_dj(client, member, newQueue.songs[0])) { 70 | return message.reply({ 71 | embeds: [new MessageEmbed() 72 | .setColor(ee.wrongcolor) 73 | .setFooter(ee.footertext, ee.footericon) 74 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 75 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 76 | ], 77 | }); 78 | } 79 | if (!args[0]) { 80 | return message.reply({ 81 | embeds: [new MessageEmbed() 82 | .setColor(ee.wrongcolor) 83 | .setFooter(ee.footertext, ee.footericon) 84 | .setTitle(`${client.allEmojis.x} **Por favor, adicione um volume!**`) 85 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}volume <80>\``) 86 | ], 87 | }); 88 | } 89 | let volume = Number(args[0]) 90 | if (volume > 150 || volume < 0) return message.reply({ 91 | embeds: [ 92 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **O volume deve estar entre \`0\` e \`150\`!**`) 93 | ], 94 | 95 | }) 96 | await newQueue.setVolume(volume); 97 | message.reply({ 98 | embeds: [new MessageEmbed() 99 | .setColor(ee.color) 100 | .setTimestamp() 101 | .setTitle(`🔊 **Volume definido para \`${volume}\`!**`) 102 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 103 | }) 104 | } catch (e) { 105 | console.log(e.stack ? e.stack : e) 106 | message.reply({ 107 | content: `${client.allEmojis.x} | Error: `, 108 | embeds: [ 109 | new MessageEmbed().setColor(ee.wrongcolor) 110 | .setDescription(`\`\`\`${e}\`\`\``) 111 | ], 112 | 113 | }) 114 | } 115 | } catch (e) { 116 | console.log(String(e.stack).bgRed) 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /commands/Fila/jump.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "jump", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["jump", "skipto"], 16 | usage: "jump ", 17 | 18 | description: "Salta para uma música específica na fila", //the command description for Slash Command Overview 19 | cooldown: 10, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | 23 | run: async (client, message, args) => { 24 | try { 25 | //things u can directly access in an interaction! 26 | const { 27 | member, 28 | channelId, 29 | guildId, 30 | applicationId, 31 | commandName, 32 | deferred, 33 | replied, 34 | ephemeral, 35 | options, 36 | id, 37 | createdTimestamp 38 | } = message; 39 | const { 40 | guild 41 | } = member; 42 | const { 43 | channel 44 | } = member.voice; 45 | if (!channel) return message.reply({ 46 | embeds: [ 47 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro**`) 48 | ], 49 | 50 | }) 51 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 52 | return message.reply({ 53 | embeds: [new MessageEmbed() 54 | .setColor(ee.wrongcolor) 55 | .setFooter(ee.footertext, ee.footericon) 56 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de Voz!`) 57 | .setDescription(`<#${guild.me.voice.channel.id}>`) 58 | ], 59 | }); 60 | } 61 | try { 62 | let newQueue = client.distube.getQueue(guildId); 63 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 64 | embeds: [ 65 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada!**`) 66 | ], 67 | 68 | }) 69 | if (check_if_dj(client, member, newQueue.songs[0])) { 70 | return message.reply({ 71 | embeds: [new MessageEmbed() 72 | .setColor(ee.wrongcolor) 73 | .setFooter(ee.footertext, ee.footericon) 74 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 75 | .setDescription(`**CARGOS-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 76 | ], 77 | }); 78 | } 79 | if (!args[0]) { 80 | return message.reply({ 81 | embeds: [new MessageEmbed() 82 | .setColor(ee.wrongcolor) 83 | .setFooter(ee.footertext, ee.footericon) 84 | .setTitle(`${client.allEmojis.x} **Adicione uma posição para a qual saltar!**`) 85 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}jump \``) 86 | ], 87 | }); 88 | } 89 | let Position = Number(args[0]) 90 | if (Position > newQueue.songs.length - 1 || Position < 0) return message.reply({ 91 | embeds: [ 92 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **A posição deve estar entre \`0\` e \`${newQueue.songs.length - 1}\`!**`) 93 | ], 94 | 95 | }) 96 | await newQueue.jump(Position); 97 | message.reply({ 98 | embeds: [new MessageEmbed() 99 | .setColor(ee.color) 100 | .setTimestamp() 101 | .setTitle(`👌 **Saltou para a \`${Position}ª \` música da fila!**`) 102 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 103 | }) 104 | } catch (e) { 105 | console.log(e.stack ? e.stack : e) 106 | message.reply({ 107 | content: `${client.allEmojis.x} | Error: `, 108 | embeds: [ 109 | new MessageEmbed().setColor(ee.wrongcolor) 110 | .setDescription(`\`\`\`${e}\`\`\``) 111 | ], 112 | 113 | }) 114 | } 115 | } catch (e) { 116 | console.log(String(e.stack).bgRed) 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /commands/Song/seek.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "seek", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "seek ", 15 | aliases: ["sek"], 16 | description: "Salta para uma posição específica na música", //the command description for Slash Command Overview 17 | cooldown: 10, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | 21 | run: async (client, message, args) => { 22 | try { 23 | //things u can directly access in an interaction! 24 | const { 25 | member, 26 | channelId, 27 | guildId, 28 | applicationId, 29 | commandName, 30 | deferred, 31 | replied, 32 | ephemeral, 33 | options, 34 | id, 35 | createdTimestamp 36 | } = message; 37 | const { 38 | guild 39 | } = member; 40 | const { 41 | channel 42 | } = member.voice; 43 | if (!channel) return message.reply({ 44 | embeds: [ 45 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 46 | ], 47 | 48 | }) 49 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 50 | return message.reply({ 51 | embeds: [new MessageEmbed() 52 | .setColor(ee.wrongcolor) 53 | .setFooter(ee.footertext, ee.footericon) 54 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz primeiro!`) 55 | .setDescription(`<#${guild.me.voice.channel.id}>`) 56 | ], 57 | }); 58 | } 59 | try { 60 | let newQueue = client.distube.getQueue(guildId); 61 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 62 | embeds: [ 63 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 64 | ], 65 | 66 | }) 67 | if (!args[0]) { 68 | return message.reply({ 69 | embeds: [ 70 | new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Adicione um numero para pular a posição na música!**`) 74 | .setDescription(`**Use:**\n> \`${client.settings.get(guild.id, "prefix")}seek \``) 75 | ], 76 | }) 77 | } 78 | let seekNumber = Number(args[0]) 79 | if (seekNumber > newQueue.songs[0].duration || seekNumber < 0) return message.reply({ 80 | embeds: [ 81 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **A posição de busca deve estar entre \`0\` e \`${newQueue.songs[0].duration}\`!**`) 82 | ], 83 | 84 | }) 85 | if (check_if_dj(client, member, newQueue.songs[0])) { 86 | return message.reply({ 87 | embeds: [new MessageEmbed() 88 | .setColor(ee.wrongcolor) 89 | .setFooter(ee.footertext, ee.footericon) 90 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 91 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 92 | ], 93 | }); 94 | } 95 | await newQueue.seek(seekNumber); 96 | message.reply({ 97 | embeds: [new MessageEmbed() 98 | .setColor(ee.color) 99 | .setTimestamp() 100 | .setTitle(`⏺ **Avançou para \`${seekNumber} Segundos\`!**`) 101 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 102 | }) 103 | } catch (e) { 104 | console.log(e.stack ? e.stack : e) 105 | message.reply({ 106 | content: `${client.allEmojis.x} | Error: `, 107 | embeds: [ 108 | new MessageEmbed().setColor(ee.wrongcolor) 109 | .setDescription(`\`\`\`${e}\`\`\``) 110 | ], 111 | 112 | }) 113 | } 114 | } catch (e) { 115 | console.log(String(e.stack).bgRed) 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /commands/Song/forward.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "forward", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "forward ", 15 | aliases: ["fwd"], 16 | description: "Avança por X segundos", //the command description for Slash Command Overview 17 | cooldown: 10, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Please join ${guild.me.voice.channel ? "__my__" : "a"} VoiceChannel First!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Join __my__ Voice Channel!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **I am nothing Playing right now!**`) 63 | ], 64 | 65 | }) 66 | 67 | if (!args[0]) { 68 | return message.reply({ 69 | embeds: [ 70 | new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Please add a Forwarding Duration!**`) 74 | .setDescription(`**Usage:**\n> \`${client.settings.get(guild.id, "prefix")}forward \``) 75 | ], 76 | }) 77 | } 78 | let seekNumber = Number(args[0]) 79 | let seektime = newQueue.currentTime + seekNumber; 80 | if (seektime >= newQueue.songs[0].duration) seektime = newQueue.songs[0].duration - 1; 81 | if (check_if_dj(client, member, newQueue.songs[0])) { 82 | return message.reply({ 83 | embeds: [new MessageEmbed() 84 | .setColor(ee.wrongcolor) 85 | .setFooter(ee.footertext, ee.footericon) 86 | .setTitle(`${client.allEmojis.x} **You are not a DJ and not the Song Requester!**`) 87 | .setDescription(`**DJ-ROLES:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 88 | ], 89 | }); 90 | } 91 | await newQueue.seek(seektime); 92 | message.reply({ 93 | embeds: [new MessageEmbed() 94 | .setColor(ee.color) 95 | .setTimestamp() 96 | .setTitle(`⏩ **Forwarded the song for \`${seekNumber} Seconds\`!**`) 97 | .setFooter(`💢 Action by: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 98 | }) 99 | } catch (e) { 100 | console.log(e.stack ? e.stack : e) 101 | message.reply({ 102 | content: `${client.allEmojis.x} | Error: `, 103 | embeds: [ 104 | new MessageEmbed().setColor(ee.wrongcolor) 105 | .setDescription(`\`\`\`${e}\`\`\``) 106 | ], 107 | 108 | }) 109 | } 110 | } catch (e) { 111 | console.log(String(e.stack).bgRed) 112 | } 113 | } 114 | } 115 | /** 116 | * @INFO 117 | * Bot Coded by Tomato#6966 | https://github.com/Tomato6966/Discord-Js-Handler-Template 118 | * @INFO 119 | * Work for Milrato Development | https://milrato.eu 120 | * @INFO 121 | * Please mention Him / Milrato Development, when using this Code! 122 | * @INFO 123 | */ 124 | -------------------------------------------------------------------------------- /commands/Filtro/customspeed.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | const FiltersSettings = require("../../botconfig/filters.json"); 12 | module.exports = { 13 | name: "customspeed", //the command name for the Slash Command 14 | 15 | category: "Filtro", 16 | usage: "speed ", 17 | aliases: ["customspeed", "changespeed", "cspeed", "mudarvelocidade", "velocidade"], 18 | 19 | description: "Altera a velocidade da música!", //the command description for Slash Command Overview 20 | cooldown: 5, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | const { 26 | member, 27 | guildId, 28 | guild 29 | } = message; 30 | const { 31 | channel 32 | } = member.voice; 33 | if (!channel) return message.reply({ 34 | embeds: [ 35 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 36 | ], 37 | 38 | }) 39 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 40 | return message.reply({ 41 | embeds: [new MessageEmbed() 42 | .setColor(ee.wrongcolor) 43 | .setFooter(ee.footertext, ee.footericon) 44 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de voz!`) 45 | .setDescription(`<#${guild.me.voice.channel.id}>`) 46 | ], 47 | }); 48 | } 49 | try { 50 | let newQueue = client.distube.getQueue(guildId); 51 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 52 | embeds: [ 53 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 54 | ], 55 | 56 | }) 57 | if (check_if_dj(client, member, newQueue.songs[0])) { 58 | return message.reply({ 59 | embeds: [new MessageEmbed() 60 | .setColor(ee.wrongcolor) 61 | .setFooter(ee.footertext, ee.footericon) 62 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e não é o Song Requester!**`) 63 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 64 | ], 65 | }); 66 | } 67 | if (!args[0]) { 68 | return message.reply({ 69 | embeds: [ 70 | new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Adicione um valor de velocidade entre 0+ e 2!**`) 74 | ], 75 | }) 76 | } 77 | let speed_amount = parseInt(args[0]) 78 | if (speed_amount <= 0 || speed_amount > 2) { 79 | return message.reply({ 80 | embeds: [ 81 | new MessageEmbed() 82 | .setColor(ee.wrongcolor) 83 | .setFooter(ee.footertext, ee.footericon) 84 | .setTitle(`${client.allEmojis.x} **Adicione um valor de velocidade entre 0+ e 2!**`) 85 | ], 86 | }) 87 | } 88 | FiltersSettings.customspeed = `atempo=${speed_amount}`; 89 | client.distube.filters = FiltersSettings; 90 | //add old filters so that they get removed 91 | //if it was enabled before then add it 92 | if (newQueue.filters.includes("customspeed")) { 93 | await newQueue.setFilter(["customspeed"]); 94 | } 95 | await newQueue.setFilter(["customspeed"]); 96 | message.reply({ 97 | embeds: [new MessageEmbed() 98 | .setColor(ee.color) 99 | .setTimestamp() 100 | .setTitle(`♨**Velociade definida para ${speed_amount}!**`) 101 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 102 | }) 103 | } catch (e) { 104 | console.log(e.stack ? e.stack : e) 105 | message.reply({ 106 | content: `${client.allEmojis.x} | Error: `, 107 | embeds: [ 108 | new MessageEmbed().setColor(ee.wrongcolor) 109 | .setDescription(`\`\`\`${e}\`\`\``) 110 | ], 111 | 112 | }) 113 | } 114 | } catch (e) { 115 | console.log(String(e.stack).bgRed) 116 | } 117 | } 118 | } -------------------------------------------------------------------------------- /commands/Musica/playskip.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "playskip", //the command name for the Slash Command 13 | 14 | category: "Musica", 15 | aliases: ["ps"], 16 | usage: "playskip ", 17 | 18 | description: "Toca uma música/lista de reprodução e pula!", //the command description for Slash Command Overview 19 | cooldown: 2, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.userLimit != 0 && channel.full) 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`<:declined:780403017160982538> Seu canal de voz está cheio, não consigo entrar!`) 56 | ], 57 | }); 58 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 59 | return message.reply({ 60 | embeds: [new MessageEmbed() 61 | .setColor(ee.wrongcolor) 62 | .setFooter(ee.footertext, ee.footericon) 63 | .setTitle(`<:declined:780403017160982538> Já estou conectado em outro lugar`) 64 | ], 65 | }); 66 | } 67 | if (!args[0]) { 68 | return message.reply({ 69 | embeds: [new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Adicione uma consulta de pesquisa!**`) 73 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}playskip \``) 74 | ], 75 | }); 76 | } 77 | //let IntOption = options.getInteger("OPTIONNAME"); //same as in IntChoices //RETURNS NUMBER 78 | const Text = args.join(" "); //same as in StringChoices //RETURNS STRING 79 | //update it without a response! 80 | let newmsg = await message.reply({ 81 | content: `🔍 Procurando... \`\`\`${Text}\`\`\``, 82 | }).catch(e => { 83 | console.log(e) 84 | }) 85 | try { 86 | let queue = client.distube.getQueue(guildId) 87 | let options = { 88 | member: member, 89 | skip: true 90 | } 91 | if (!queue) options.textChannel = guild.channels.cache.get(channelId) 92 | if (queue) { 93 | if (check_if_dj(client, member, queue.songs[0])) { 94 | return message.reply({ 95 | embeds: [new MessageEmbed() 96 | .setColor(ee.wrongcolor) 97 | .setFooter(ee.footertext, ee.footericon) 98 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 99 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, queue.songs[0])}`) 100 | ], 101 | }); 102 | } 103 | } 104 | await client.distube.playVoiceChannel(channel, Text, options) 105 | //Edit the reply 106 | newmsg.edit({ 107 | content: `${queue.songs.length > 0 ? "⏭ Pulando para" : "🎶 Tocando Agora"}: \`\`\`css\n${Text}\n\`\`\``, 108 | }).catch(e => { 109 | console.log(e) 110 | }) 111 | } catch (e) { 112 | console.log(e.stack ? e.stack : e) 113 | message.reply({ 114 | content: `${client.allEmojis.x} | Error: `, 115 | embeds: [ 116 | new MessageEmbed().setColor(ee.wrongcolor) 117 | .setDescription(`\`\`\`${e}\`\`\``) 118 | ], 119 | 120 | }) 121 | } 122 | } catch (e) { 123 | console.log(String(e.stack).bgRed) 124 | } 125 | } 126 | } -------------------------------------------------------------------------------- /commands/Filtro/custombassboost.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | const FiltersSettings = require("../../botconfig/filters.json"); 12 | module.exports = { 13 | name: "custombassboost", //the command name for the Slash Command 14 | 15 | category: "Filtro", 16 | usage: "custombassboost ", 17 | aliases: ["bassboost", "bb", "bass", "custombass", "cbassboost", "cbass", "cbb", "custombb"], 18 | 19 | description: "Define um Bassboost personalizado com ganho!", //the command description for Slash Command Overview 20 | cooldown: 5, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | const { 26 | member, 27 | guildId, 28 | guild 29 | } = message; 30 | const { 31 | channel 32 | } = member.voice; 33 | if (!channel) return message.reply({ 34 | embeds: [ 35 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 36 | ], 37 | 38 | }) 39 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 40 | return message.reply({ 41 | embeds: [new MessageEmbed() 42 | .setColor(ee.wrongcolor) 43 | .setFooter(ee.footertext, ee.footericon) 44 | .setTitle(`${client.allEmojis.x} Entre no __meu__ Canal de voz primeiro!`) 45 | .setDescription(`<#${guild.me.voice.channel.id}>`) 46 | ], 47 | }); 48 | } 49 | try { 50 | let newQueue = client.distube.getQueue(guildId); 51 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 52 | embeds: [ 53 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 54 | ], 55 | 56 | }) 57 | if (check_if_dj(client, member, newQueue.songs[0])) { 58 | return message.reply({ 59 | embeds: [new MessageEmbed() 60 | .setColor(ee.wrongcolor) 61 | .setFooter(ee.footertext, ee.footericon) 62 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e não é o Song Requester!**`) 63 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 64 | ], 65 | }); 66 | } 67 | if (!args[0]) { 68 | return message.reply({ 69 | embeds: [ 70 | new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Por favor, adicione um Bassboost-Gain entre 0 e 20!**`) 74 | ], 75 | }) 76 | } 77 | let bass_gain = parseInt(args[0]) 78 | 79 | if (bass_gain > 20 || bass_gain < 0) { 80 | return message.reply({ 81 | embeds: [ 82 | new MessageEmbed() 83 | .setColor(ee.wrongcolor) 84 | .setFooter(ee.footertext, ee.footericon) 85 | .setTitle(`${client.allEmojis.x} **O ganho de Bassboost deve estar entre 0 e 20!**`) 86 | ], 87 | }) 88 | } 89 | FiltersSettings.custombassboost = `bass=g=${bass_gain},dynaudnorm=f=200`; 90 | client.distube.filters = FiltersSettings; 91 | //add old filters so that they get removed 92 | //if it was enabled before then add it 93 | if (newQueue.filters.includes("custombassboost")) { 94 | await newQueue.setFilter(["custombassboost"]); 95 | } 96 | await newQueue.setFilter(["custombassboost"]); 97 | message.reply({ 98 | embeds: [new MessageEmbed() 99 | .setColor(ee.color) 100 | .setTimestamp() 101 | .setTitle(`♨️ **Bassboost definido para ${bass_gain}!**`) 102 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 103 | }) 104 | } catch (e) { 105 | console.log(e.stack ? e.stack : e) 106 | message.reply({ 107 | content: `${client.allEmojis.x} | Error: `, 108 | embeds: [ 109 | new MessageEmbed().setColor(ee.wrongcolor) 110 | .setDescription(`\`\`\`${e}\`\`\``) 111 | ], 112 | 113 | }) 114 | } 115 | } catch (e) { 116 | console.log(String(e.stack).bgRed) 117 | } 118 | } 119 | } -------------------------------------------------------------------------------- /commands/Song/grab.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "grab", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "grab", 15 | aliases: ["take", "steal"], 16 | description: "Salta para uma posição específica na música", //the command description for Slash Command Overview 17 | cooldown: 10, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 63 | ], 64 | 65 | }) 66 | let newTrack = newQueue.songs[0]; 67 | member.send({ 68 | content: `${client.settings.get(guild.id, "prefix")}play ${newTrack.url}`, 69 | embeds: [ 70 | new MessageEmbed().setColor(ee.color) 71 | .setTitle(newTrack.name) 72 | .setURL(newTrack.url) 73 | .addField(`💡 Requerido por:`, `>>> ${newTrack.user}`, true) 74 | .addField(`⏱ Duração:`, `>>> \`${newQueue.formattedCurrentTime} / ${newTrack.formattedDuration}\``, true) 75 | .addField(`🌀 Fila:`, `>>> \`${newQueue.songs.length} música(s)\`\n\`${newQueue.formattedDuration}\``, true) 76 | .addField(`🔊 Volume:`, `>>> \`${newQueue.volume} %\``, true) 77 | .addField(`♾ Loop:`, `>>> ${newQueue.repeatMode ? newQueue.repeatMode === 2 ? `${client.allEmojis.check_mark} \`Fila\`` : `${client.allEmojis.check_mark} \`Música\`` : `${client.allEmojis.x}`}`, true) 78 | .addField(`↪️ Reprodução automática:`, `>>> ${newQueue.autoplay ? `${client.allEmojis.check_mark}` : `${client.allEmojis.x}`}`, true) 79 | .addField(`❔ Baixar Música:`, `>>> [\`Clique aqui\`](${newTrack.streamURL})`, true) 80 | .addField(`❔ Filtro${newQueue.filters.length > 0 ? "s": ""}:`, `>>> ${newQueue.filters && newQueue.filters.length > 0 ? `${newQueue.filters.map(f=>`\`${f}\``).join(`, `)}` : `${client.allEmojis.x}`}`, newQueue.filters.length > 1 ? false : true) 81 | .setThumbnail(`https://img.youtube.com/vi/${newTrack.id}/mqdefault.jpg`) 82 | .setFooter(`Tocado em: ${guild.name}`, guild.iconURL({ 83 | dynamic: true 84 | })).setTimestamp() 85 | ] 86 | }).then(() => { 87 | message.reply({ 88 | content: `📪 **Pegou! Verifique seu Dm!**`, 89 | }) 90 | }).catch(() => { 91 | message.reply({ 92 | content: `${client.allEmojis.x} **Eu não posso enviar dm para você!**`, 93 | }) 94 | }) 95 | } catch (e) { 96 | console.log(e.stack ? e.stack : e) 97 | message.reply({ 98 | content: `${client.allEmojis.x} | Error: `, 99 | embeds: [ 100 | new MessageEmbed().setColor(ee.wrongcolor) 101 | .setDescription(`\`\`\`${e}\`\`\``) 102 | ], 103 | 104 | }) 105 | } 106 | } catch (e) { 107 | console.log(String(e.stack).bgRed) 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /commands/Musica/playtop.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "playtop", //the command name for the Slash Command 13 | 14 | category: "Musica", 15 | aliases: ["pt"], 16 | usage: "playtop ", 17 | 18 | description: "Toca uma música/lista de reprodução e adiciona ao topo!", //the command description for Slash Command Overview 19 | cooldown: 2, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | 23 | run: async (client, message, args) => { 24 | try { 25 | //console.log(interaction, StringOption) 26 | 27 | //things u can directly access in an interaction! 28 | const { 29 | member, 30 | channelId, 31 | guildId, 32 | applicationId, 33 | commandName, 34 | deferred, 35 | replied, 36 | ephemeral, 37 | options, 38 | id, 39 | createdTimestamp 40 | } = message; 41 | const { 42 | guild 43 | } = member; 44 | const { 45 | channel 46 | } = member.voice; 47 | if (!channel) return message.reply({ 48 | embeds: [ 49 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 50 | ], 51 | 52 | }) 53 | if (channel.userLimit != 0 && channel.full) 54 | return message.reply({ 55 | embeds: [new MessageEmbed() 56 | .setColor(ee.wrongcolor) 57 | .setFooter(ee.footertext, ee.footericon) 58 | .setTitle(`<:declined:780403017160982538> Seu canal de voz está cheio, não consigo entrar!`) 59 | ], 60 | }); 61 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 62 | return message.reply({ 63 | embeds: [new MessageEmbed() 64 | .setColor(ee.wrongcolor) 65 | .setFooter(ee.footertext, ee.footericon) 66 | .setTitle(`<:declined:780403017160982538> Já estou conectado em outro lugar`) 67 | ], 68 | }); 69 | } 70 | if (!args[0]) { 71 | return message.reply({ 72 | embeds: [new MessageEmbed() 73 | .setColor(ee.wrongcolor) 74 | .setFooter(ee.footertext, ee.footericon) 75 | .setTitle(`${client.allEmojis.x} **Adicione uma consulta de pesquisa!**`) 76 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}playtop \``) 77 | ], 78 | }); 79 | } 80 | //let IntOption = options.getInteger("OPTIONNAME"); //same as in IntChoices //RETURNS NUMBER 81 | const Text = args.join(" "); //same as in StringChoices //RETURNS STRING 82 | //update it without a response! 83 | let newmsg = await message.reply({ 84 | content: `🔍 Procurando... \`\`\`${Text}\`\`\``, 85 | }).catch(e => { 86 | console.log(e) 87 | }) 88 | try { 89 | let queue = client.distube.getQueue(guildId) 90 | let options = { 91 | member: member, 92 | unshift: true 93 | } 94 | if (!queue) options.textChannel = guild.channels.cache.get(channelId) 95 | if (queue) { 96 | if (check_if_dj(client, member, queue.songs[0])) { 97 | return message.reply({ 98 | embeds: [new MessageEmbed() 99 | .setColor(ee.wrongcolor) 100 | .setFooter(ee.footertext, ee.footericon) 101 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 102 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, queue.songs[0])}`) 103 | ], 104 | }); 105 | } 106 | } 107 | await client.distube.playVoiceChannel(channel, Text, options) 108 | //Edit the reply 109 | newmsg.edit({ 110 | content: `${queue.songs.length > 0 ? "👍 Adicionado ao topo da fila" : "🎶 Tocando Agora"}: \`\`\`css\n${Text}\n\`\`\``, 111 | }).catch(e => { 112 | console.log(e) 113 | }) 114 | } catch (e) { 115 | console.log(e.stack ? e.stack : e) 116 | message.reply({ 117 | content: `${client.allEmojis.x} | Error: `, 118 | embeds: [ 119 | new MessageEmbed().setColor(ee.wrongcolor) 120 | .setDescription(`\`\`\`${e}\`\`\``) 121 | ], 122 | 123 | }) 124 | } 125 | } catch (e) { 126 | console.log(String(e.stack).bgRed) 127 | } 128 | } 129 | } -------------------------------------------------------------------------------- /events/guild/interactionCreate.js: -------------------------------------------------------------------------------- 1 | //Import Modules 2 | const config = require(`../../botconfig/config.json`); 3 | const ee = require(`../../botconfig/embed.json`); 4 | const settings = require(`../../botconfig/settings.json`); 5 | const { onCoolDown, replacemsg } = require("../../handlers/functions"); 6 | const Discord = require("discord.js"); 7 | module.exports = (client, interaction) => { 8 | const CategoryName = interaction.commandName; 9 | client.settings.ensure(interaction.guildId, { 10 | prefix: config.prefix, 11 | defaultvolume: 50, 12 | defaultautoplay: false, 13 | defaultfilters: [`bassboost6`, `clear`], 14 | djroles: [], 15 | }) 16 | let prefix = client.settings.get(interaction.guildId) 17 | let command = false; 18 | try{ 19 | if (client.slashCommands.has(CategoryName + interaction.options.getSubcommand())) { 20 | command = client.slashCommands.get(CategoryName + interaction.options.getSubcommand()); 21 | } 22 | }catch{ 23 | if (client.slashCommands.has("normal" + CategoryName)) { 24 | command = client.slashCommands.get("normal" + CategoryName); 25 | } 26 | } 27 | if(command) { 28 | let botchannels = client.settings.get(interaction.guildId, `botchannel`); 29 | if(!botchannels || !Array.isArray(botchannels)) botchannels = []; 30 | if (botchannels.length > 0) { 31 | if (!botchannels.includes(interaction.channelId) && !interaction.member.permissions.has("ADMINISTRATOR")) { 32 | return interaction.reply({ ephemeral: true, 33 | embeds: [new Discord.MessageEmbed() 34 | .setColor(ee.wrongcolor) 35 | .setFooter(ee.footertext, ee.footericon) 36 | .setTitle(`${client.allEmojis.x} **Você não tem permissão para usar este comando aqui!**`) 37 | .setDescription(`Por favor, faça isso em um desses canais:\n> ${botchannels.map(c=>`<#${c}>`).join(", ")}`) 38 | ] 39 | }) 40 | } 41 | } 42 | if (onCoolDown(interaction, command)) { 43 | return interaction.reply({ephemeral: true, 44 | embeds: [new Discord.MessageEmbed() 45 | .setColor(ee.wrongcolor) 46 | .setFooter(ee.footertext, ee.footericon) 47 | .setTitle(replacemsg(settings.messages.cooldown, { 48 | prefix: prefix, 49 | command: command, 50 | timeLeft: onCoolDown(interaction, command) 51 | }))] 52 | }); 53 | } 54 | //if Command has specific permission return error 55 | if (command.memberpermissions && command.memberpermissions.length > 0 && !interaction.member.permissions.has(command.memberpermissions)) { 56 | return interaction.reply({ ephemeral: true, embeds: [new Discord.MessageEmbed() 57 | .setColor(ee.wrongcolor) 58 | .setFooter(ee.footertext, ee.footericon) 59 | .setTitle(replacemsg(settings.messages.notallowed_to_exec_cmd.title)) 60 | .setDescription(replacemsg(settings.messages.notallowed_to_exec_cmd.description.memberpermissions, { 61 | command: command, 62 | prefix: prefix 63 | }))] 64 | }); 65 | } 66 | //if Command has specific needed roles return error 67 | if (command.requiredroles && command.requiredroles.length > 0 && interaction.member.roles.cache.size > 0 && !interaction.member.roles.cache.some(r => command.requiredroles.includes(r.id))) { 68 | return interaction.reply({ ephemeral: true, embeds: [new Discord.MessageEmbed() 69 | .setColor(ee.wrongcolor) 70 | .setFooter(ee.footertext, ee.footericon) 71 | .setTitle(replacemsg(settings.messages.notallowed_to_exec_cmd.title)) 72 | .setDescription(replacemsg(settings.messages.notallowed_to_exec_cmd.description.requiredroles, { 73 | command: command, 74 | prefix: prefix 75 | }))] 76 | }) 77 | } 78 | //if Command has specific users return error 79 | if (command.alloweduserids && command.alloweduserids.length > 0 && !command.alloweduserids.includes(interaction.member.id)) { 80 | return message.channel.send({ ephemeral: true, embeds: [new Discord.MessageEmbed() 81 | .setColor(ee.wrongcolor) 82 | .setFooter(ee.footertext, ee.footericon) 83 | .setTitle(replacemsg(settings.messages.notallowed_to_exec_cmd.title)) 84 | .setDescription(replacemsg(settings.messages.notallowed_to_exec_cmd.description.alloweduserids, { 85 | command: command, 86 | prefix: prefix 87 | }))] 88 | }); 89 | } 90 | //execute the Command 91 | command.run(client, interaction) 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /commands/Fila/status.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "status", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["stats"], 16 | usage: "status", 17 | 18 | description: "Mostra o status da fila", //the command description for Slash Command Overview 19 | cooldown: 10, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor entre em ${guild.me.voice.channel ? "__meu__" : "um"} canal de voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 65 | ], 66 | 67 | }) 68 | var djs = client.settings.get(newQueue.id, `djroles`).map(r => `<@&${r}>`); 69 | if (djs.length == 0) djs = "`não configurado`"; 70 | else djs.join(", "); 71 | let newTrack = newQueue.songs[0]; 72 | let embed = new MessageEmbed().setColor(ee.color) 73 | .setDescription(`Veja a [fila no **DASHBOARD** ao vivo!](https://king-v13.kingprogrammer.repl.co/queuedashboard${newQueue.id})`) 74 | .addField(`💡 Requerido por:`, `>>> ${newTrack.user}`, true) 75 | .addField(`⏱ Duração:`, `>>> \`${newQueue.formattedCurrentTime} / ${newTrack.formattedDuration}\``, true) 76 | .addField(`🌀 Fila:`, `>>> \`${newQueue.songs.length} song(s)\`\n\`${newQueue.formattedDuration}\``, true) 77 | .addField(`🔊 Volume:`, `>>> \`${newQueue.volume} %\``, true) 78 | .addField(`♾ Loop:`, `>>> ${newQueue.repeatMode ? newQueue.repeatMode === 2 ? `${client.allEmojis.check_mark} \`Queue\`` : `${client.allEmojis.check_mark} \`Song\`` : `${client.allEmojis.x}`}`, true) 79 | .addField(`↪️ Reprodução automática:`, `>>> ${newQueue.autoplay ? `${client.allEmojis.check_mark}` : `${client.allEmojis.x}`}`, true) 80 | .addField(`❔ Baixar música:`, `>>> [\`Clique aqui\`](${newTrack.streamURL})`, true) 81 | .addField(`❔ Filtros${newQueue.filters.length > 0 ? "s": ""}:`, `>>> ${newQueue.filters && newQueue.filters.length > 0 ? `${newQueue.filters.map(f=>`\`${f}\``).join(`, `)}` : `${client.allEmojis.x}`}`, newQueue.filters.length > 1 ? false : true) 82 | .addField(`🎧 CARGOS-DJ${client.settings.get(newQueue.id, "djroles").length > 1 ? "s": ""}:`, `>>> ${djs}`, client.settings.get(newQueue.id, "djroles").length > 1 ? false : true) 83 | .setAuthor(`${newTrack.name}`, `https://c.tenor.com/HJvqN2i4Zs4AAAAj/milk-and-mocha-cute.gif`, newTrack.url) 84 | .setThumbnail(`https://img.youtube.com/vi/${newTrack.id}/mqdefault.jpg`) 85 | .setFooter(`${newTrack.user.tag}`, newTrack.user.displayAvatarURL({ 86 | dynamic: true 87 | })); 88 | message.reply({ 89 | embeds: [embed] 90 | }) 91 | } catch (e) { 92 | console.log(e.stack ? e.stack : e) 93 | message.reply({ 94 | content: `${client.allEmojis.x} | Error: `, 95 | embeds: [ 96 | new MessageEmbed().setColor(ee.wrongcolor) 97 | .setDescription(`\`\`\`${e}\`\`\``) 98 | ], 99 | 100 | }) 101 | } 102 | } catch (e) { 103 | console.log(String(e.stack).bgRed) 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /commands/Song/nowplaying.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "nowplaying", //the command name for the Slash Command 13 | category: "Song", 14 | usage: "nowplaying", 15 | aliases: ["np", "current", "agora", "now"], 16 | description: "Mostra a música que está tocando no momento", //the command description for Slash Command Overview 17 | cooldown: 5, 18 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 19 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 20 | run: async (client, message, args) => { 21 | try { 22 | //things u can directly access in an interaction! 23 | const { 24 | member, 25 | channelId, 26 | guildId, 27 | applicationId, 28 | commandName, 29 | deferred, 30 | replied, 31 | ephemeral, 32 | options, 33 | id, 34 | createdTimestamp 35 | } = message; 36 | const { 37 | guild 38 | } = member; 39 | const { 40 | channel 41 | } = member.voice; 42 | if (!channel) return message.reply({ 43 | embeds: [ 44 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 45 | ], 46 | 47 | }) 48 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 49 | return message.reply({ 50 | embeds: [new MessageEmbed() 51 | .setColor(ee.wrongcolor) 52 | .setFooter(ee.footertext, ee.footericon) 53 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 54 | .setDescription(`<#${guild.me.voice.channel.id}>`) 55 | ], 56 | }); 57 | } 58 | try { 59 | let newQueue = client.distube.getQueue(guildId); 60 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 61 | embeds: [ 62 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 63 | ], 64 | 65 | }) 66 | let newTrack = newQueue.songs[0]; 67 | message.reply({ 68 | content: `${client.settings.get(guild.id, "prefix")}play ${newTrack.url}`, 69 | embeds: [ 70 | new MessageEmbed().setColor(ee.color) 71 | .setTitle(newTrack.name) 72 | .setURL(newTrack.url) 73 | .addField(`💡 Requerido por:`, `>>> ${newTrack.user}`, true) 74 | .addField(`⏱ Duração:`, `>>> \`${newQueue.formattedCurrentTime} / ${newTrack.formattedDuration}\``, true) 75 | .addField(`🌀 Fila:`, `>>> \`${newQueue.songs.length} Músicas(s)\`\n\`${newQueue.formattedDuration}\``, true) 76 | .addField(`🔊 Volume:`, `>>> \`${newQueue.volume} %\``, true) 77 | .addField(`♾ Loop:`, `>>> ${newQueue.repeatMode ? newQueue.repeatMode === 2 ? `${client.allEmojis.check_mark} \`Queue\`` : `${client.allEmojis.check_mark} \`Song\`` : `${client.allEmojis.x}`}`, true) 78 | .addField(`↪️ Reprodução automática:`, `>>> ${newQueue.autoplay ? `${client.allEmojis.check_mark}` : `${client.allEmojis.x}`}`, true) 79 | .addField(`❔ Baixar Música:`, `>>> [\`Clique aqui\`](${newTrack.streamURL})`, true) 80 | .addField(`❔ Filtro${newQueue.filters.length > 0 ? "s": ""}:`, `>>> ${newQueue.filters && newQueue.filters.length > 0 ? `${newQueue.filters.map(f=>`\`${f}\``).join(`, `)}` : `${client.allEmojis.x}`}`, newQueue.filters.length > 1 ? false : true) 81 | .addField(`<:Youtube:840260133686870036> View${newTrack.views > 0 ? "s": ""}:`, `>>> \`${newTrack.views}\``, true) 82 | .addField(`:thumbsup: Like${newTrack.likes > 0 ? "s": ""}:`, `>>> \`${newTrack.likes}\``, true) 83 | .addField(`:thumbsdown: Dislike${newTrack.dislikes > 0 ? "s": ""}:`, `>>> \`${newTrack.dislikes}\``, true) 84 | .setThumbnail(`https://img.youtube.com/vi/${newTrack.id}/mqdefault.jpg`) 85 | .setFooter(`Tocando em: ${guild.name}`, guild.iconURL({ 86 | dynamic: true 87 | })).setTimestamp() 88 | ] 89 | }).catch((e) => { 90 | onsole.log(e.stack ? e.stack : e) 91 | }) 92 | } catch (e) { 93 | console.log(e.stack ? e.stack : e) 94 | message.reply({ 95 | content: `${client.allEmojis.x} | Error: `, 96 | embeds: [ 97 | new MessageEmbed().setColor(ee.wrongcolor) 98 | .setDescription(`\`\`\`${e}\`\`\``) 99 | ], 100 | 101 | }) 102 | } 103 | } catch (e) { 104 | console.log(String(e.stack).bgRed) 105 | } 106 | } 107 | } -------------------------------------------------------------------------------- /commands/Filtro/add.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const FiltersSettings = require("../../botconfig/filters.json"); 9 | const { 10 | check_if_dj 11 | } = require("../../handlers/functions") 12 | 13 | module.exports = { 14 | name: "addfilter", //the command name for the Slash Command 15 | category: "Filtro", 16 | usage: "addfilter ", 17 | aliases: ["addfilters", "add", "addf", "addfiltro"], 18 | 19 | description: "Adicione um filtro aos filtros", //the command description for Slash Command Overview 20 | cooldown: 5, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | const { 26 | member, 27 | guildId, 28 | guild 29 | } = message; 30 | const { 31 | channel 32 | } = member.voice; 33 | if (!channel) return message.reply({ 34 | embeds: [ 35 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Junte-se ${guild.me.voice.channel? "__ao meu__": "a um"} canal de voz primeiro!**`) 36 | ], 37 | }) 38 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 39 | return message.reply({ 40 | embeds: [new MessageEmbed() 41 | .setColor(ee.wrongcolor) 42 | .setFooter(ee.footertext, ee.footericon) 43 | .setTitle(`${client.allEmojis.x} Junte-se ao __meu__ canal de voz!`) 44 | .setDescription(`<#${guild.me.voice.channel.id}>`) 45 | ], 46 | }); 47 | } 48 | try { 49 | let newQueue = client.distube.getQueue(guildId); 50 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 51 | embeds: [ 52 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 53 | ], 54 | }) 55 | if (check_if_dj(client, member, newQueue.songs[0])) { 56 | return message.reply({ 57 | embeds: [new MessageEmbed() 58 | .setColor(ee.wrongcolor) 59 | .setFooter(ee.footertext, ee.footericon) 60 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e a música não foi requisitada por você!**`) 61 | .setDescription(`**CARGOS-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 62 | ], 63 | }); 64 | } 65 | let filters = args; 66 | if (filters.some(a => !FiltersSettings[a])) { 67 | return message.reply({ 68 | embeds: [ 69 | new MessageEmbed() 70 | .setColor(ee.wrongcolor) 71 | .setFooter(ee.footertext, ee.footericon) 72 | .setTitle(`${client.allEmojis.x} **Você adicionou pelo menos um filtro, que é inválido!**`) 73 | .setDescription("**Para definir vários filtros, adicione um ESPAÇO (` `) entre! ** ") .addField ("** Todos os filtros válidos:**", Object.keys(FiltersSettings).map(f => `\`${f}\``).join(", ") + "\n\n**Nota:**\n> *Todos os filtros, começando com o personalizado, têm seu próprio Comando, use-os para definir o valor personalizado que você deseja!*") 74 | ], 75 | }) 76 | } 77 | let toAdded = []; 78 | //add new filters 79 | filters.forEach((f) => { 80 | if (!newQueue.filters.includes(f)) { 81 | toAdded.push(f) 82 | } 83 | }) 84 | if (!toAdded || toAdded.length == 0) { 85 | return message.reply({ 86 | embeds: [ 87 | new MessageEmbed() 88 | .setColor(ee.wrongcolor) 89 | .setFooter(ee.footertext, ee.footericon) 90 | .setTitle(`${client.allEmojis.x} **Você não adicionou um Filtro, que ainda não está nos Filtros.**`) 91 | .addField("**Todos os __Filtros__ Atuais**", newQueue.filters.map(f => `\`${f}\``).join(", ")) 92 | ], 93 | }) 94 | } 95 | await newQueue.setFilter(toAdded); 96 | message.reply({ 97 | embeds: [new MessageEmbed() 98 | .setColor(ee.color) 99 | .setTimestamp() 100 | .setTitle(`♨️ **Adicionado ${toAdded.length} ${toAdded.length == filters.length ? "Filtros": `de ${filters.length} Filtros! O Resto já fazia parte dos Filtros!`}**`) 101 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 102 | }) 103 | } catch (e) { 104 | console.log(e.stack ? e.stack : e) 105 | message.reply({ 106 | content: `${client.allEmojis.x} | Error: `, 107 | embeds: [ 108 | new MessageEmbed().setColor(ee.wrongcolor) 109 | .setDescription(`\`\`\`${e}\`\`\``) 110 | ], 111 | }) 112 | } 113 | } catch (e) { 114 | console.log(String(e.stack).bgRed) 115 | } 116 | } 117 | } -------------------------------------------------------------------------------- /commands/Filtro/set.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | const FiltersSettings = require("../../botconfig/filters.json"); 12 | module.exports = { 13 | name: "setfilter", //the command name for the Slash Command 14 | 15 | category: "Filtro", 16 | usage: "setfilter ", 17 | aliases: ["setfilters", "set", "setf", "definirfiltro", "mudarfiltro"], 18 | 19 | description: "Define (substitui) todos os filtros", //the command description for Slash Command Overview 20 | cooldown: 5, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | const { 26 | member, 27 | guildId, 28 | guild 29 | } = message; 30 | const { 31 | channel 32 | } = member.voice; 33 | if (!channel) return message.reply({ 34 | embeds: [ 35 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 36 | ], 37 | 38 | }) 39 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 40 | return message.reply({ 41 | embeds: [new MessageEmbed() 42 | .setColor(ee.wrongcolor) 43 | .setFooter(ee.footertext, ee.footericon) 44 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz primeiro!`) 45 | .setDescription(`<#${guild.me.voice.channel.id}>`) 46 | ], 47 | }); 48 | } 49 | try { 50 | let newQueue = client.distube.getQueue(guildId); 51 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 52 | embeds: [ 53 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 54 | ], 55 | 56 | }) 57 | if (check_if_dj(client, member, newQueue.songs[0])) { 58 | return message.reply({ 59 | embeds: [new MessageEmbed() 60 | .setColor(ee.wrongcolor) 61 | .setFooter(ee.footertext, ee.footericon) 62 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e não é o Song Requester!**`) 63 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 64 | ], 65 | }); 66 | } 67 | let filters = args; 68 | if (filters.some(a => !FiltersSettings[a])) { 69 | return message.reply({ 70 | embeds: [ 71 | new MessageEmbed() 72 | .setColor(ee.wrongcolor) 73 | .setFooter(ee.footertext, ee.footericon) 74 | .setTitle(`${client.allEmojis.x} **Você adicionou pelo menos um filtro, que é inválido!**`) 75 | .setDescription("**Para definir vários filtros, adicione um ESPAÇO no meio (` `)!**") 76 | .addField("**All Valid Filters:**", Object.keys(FiltersSettings).map(f => `\`${f}\``).join(", ") + "\n\n**Nota:**\n> *Todos os filtros, começando com o personalizado, têm seu próprio Comando, use-os para definir o valor personalizado que você deseja!*") 77 | ], 78 | }) 79 | } 80 | let amount = filters.length; 81 | let toAdded = filters; 82 | //add old filters so that they get removed 83 | newQueue.filters.forEach((f) => { 84 | if (!filters.includes(f)) { 85 | toAdded.push(f) 86 | } 87 | }) 88 | if (!toAdded || toAdded.length == 0) { 89 | return message.reply({ 90 | embeds: [ 91 | new MessageEmbed() 92 | .setColor(ee.wrongcolor) 93 | .setFooter(ee.footertext, ee.footericon) 94 | .setTitle(`${client.allEmojis.x} **Você não adicionou um Filtro, que (não) ainda está nos Filtros.**`) 95 | .addField("**Todo os Filtros __Disponiveis__:**", newQueue.filters.map(f => `\`${f}\``).join(", ")) 96 | ], 97 | }) 98 | } 99 | await newQueue.setFilter(filters); 100 | message.reply({ 101 | embeds: [new MessageEmbed() 102 | .setColor(ee.color) 103 | .setTimestamp() 104 | .setTitle(`♨**Definido ${amount} Filtros!**`) 105 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 106 | }) 107 | } catch (e) { 108 | console.log(e.stack ? e.stack : e) 109 | message.reply({ 110 | content: `${client.allEmojis.x} | Error: `, 111 | embeds: [ 112 | new MessageEmbed().setColor(ee.wrongcolor) 113 | .setDescription(`\`\`\`${e}\`\`\``) 114 | ], 115 | 116 | }) 117 | } 118 | } catch (e) { 119 | console.log(String(e.stack).bgRed) 120 | } 121 | } 122 | } -------------------------------------------------------------------------------- /commands/Filtro/remove.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | const FiltersSettings = require("../../botconfig/filters.json"); 12 | module.exports = { 13 | name: "removefilter", //the command name for the Slash Command 14 | 15 | category: "Filtro", 16 | usage: "removefilter ", 17 | aliases: ["removefilters", "remove", "removef"], 18 | 19 | description: "Remove um filtro da fila", //the command description for Slash Command Overview 20 | cooldown: 5, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | const { 26 | member, 27 | guildId, 28 | guild 29 | } = message; 30 | const { 31 | channel 32 | } = member.voice; 33 | if (!channel) return message.reply({ 34 | embeds: [ 35 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de voz primeiro!**`) 36 | ], 37 | 38 | }) 39 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 40 | return message.reply({ 41 | embeds: [new MessageEmbed() 42 | .setColor(ee.wrongcolor) 43 | .setFooter(ee.footertext, ee.footericon) 44 | .setTitle(`${client.allEmojis.x} Entre no __meu__ canal de voz!`) 45 | .setDescription(`<#${guild.me.voice.channel.id}>`) 46 | ], 47 | }); 48 | } 49 | try { 50 | let newQueue = client.distube.getQueue(guildId); 51 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 52 | embeds: [ 53 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 54 | ], 55 | 56 | }) 57 | if (check_if_dj(client, member, newQueue.songs[0])) { 58 | return message.reply({ 59 | embeds: [new MessageEmbed() 60 | .setColor(ee.wrongcolor) 61 | .setFooter(ee.footertext, ee.footericon) 62 | .setTitle(`${client.allEmojis.x}**Você não é um DJ e não é Song Requester!**`) 63 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 64 | ], 65 | }); 66 | } 67 | let filters = args; 68 | if (filters.some(a => !FiltersSettings[a])) { 69 | return message.reply({ 70 | embeds: [ 71 | new MessageEmbed() 72 | .setColor(ee.wrongcolor) 73 | .setFooter(ee.footertext, ee.footericon) 74 | .setTitle(`${client.allEmojis.x} **Você adicionou pelo menos um filtro, que é inválido!**`) 75 | .setDescription("**Para definir vários filtros, adicione um ESPAÇO entre (` `)!**") 76 | .addField("**All Valid Filters:**", Object.keys(FiltersSettings).map(f => `\`${f}\``).join(", ") + "\n\n**Nota:**\n> *Todos os filtros, começando com o personalizado, têm seu próprio Comando, use-os para definir o valor personalizado que você deseja!*") 77 | ], 78 | }) 79 | } 80 | let toRemove = []; 81 | //add new filters bassboost, clear --> [clear] -> [bassboost] 82 | filters.forEach((f) => { 83 | if (newQueue.filters.includes(f)) { 84 | toRemove.push(f) 85 | } 86 | }) 87 | if (!toRemove || toRemove.length == 0) { 88 | return message.reply({ 89 | embeds: [ 90 | new MessageEmbed() 91 | .setColor(ee.wrongcolor) 92 | .setFooter(ee.footertext, ee.footericon) 93 | .setTitle(`${client.allEmojis.x} **Você não adicionou um Filtro, que está nos Filtros.**`) 94 | .addField("**Todos os Filtros __Disponiveis__:**", newQueue.filters.map(f => `\`${f}\``).join(", ")) 95 | ], 96 | }) 97 | } 98 | await newQueue.setFilter(toRemove); 99 | message.reply({ 100 | embeds: [new MessageEmbed() 101 | .setColor(ee.color) 102 | .setTimestamp() 103 | .setTitle(`♨**Removido ${toRemove.length} ${toRemove.length == filters.length ? "Filtros": `de ${filters.length} Filtros! O resto ainda não fazia parte dos filtros!`}**`) 104 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 105 | }) 106 | } catch (e) { 107 | console.log(e.stack ? e.stack : e) 108 | message.reply({ 109 | content: `${client.allEmojis.x} | Error: `, 110 | embeds: [ 111 | new MessageEmbed().setColor(ee.wrongcolor) 112 | .setDescription(`\`\`\`${e}\`\`\``) 113 | ], 114 | 115 | }) 116 | } 117 | } catch (e) { 118 | console.log(String(e.stack).bgRed) 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /commands/Fila/list.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | MessageSelectMenu, 4 | MessageActionRow 5 | } = require("discord.js"); 6 | const config = require("../../botconfig/config.json"); 7 | const ee = require("../../botconfig/embed.json"); 8 | const settings = require("../../botconfig/settings.json"); 9 | const { 10 | check_if_dj 11 | } = require("../../handlers/functions") 12 | module.exports = { 13 | name: "list", //the command name for the Slash Command 14 | 15 | category: "Fila", 16 | aliases: ["list", "queue", "queuelist"], 17 | usage: "list", 18 | 19 | description: "Lista a fila atual", //the command description for Slash Command Overview 20 | cooldown: 10, 21 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 22 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 23 | run: async (client, message, args) => { 24 | try { 25 | //things u can directly access in an interaction! 26 | const { 27 | member, 28 | channelId, 29 | guildId, 30 | applicationId, 31 | commandName, 32 | deferred, 33 | replied, 34 | ephemeral, 35 | options, 36 | id, 37 | createdTimestamp 38 | } = message; 39 | const { 40 | guild 41 | } = member; 42 | const { 43 | channel 44 | } = member.voice; 45 | if (!channel) return message.reply({ 46 | embeds: [ 47 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor Junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 48 | ], 49 | 50 | }) 51 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 52 | return message.reply({ 53 | embeds: [new MessageEmbed() 54 | .setColor(ee.wrongcolor) 55 | .setFooter(ee.footertext, ee.footericon) 56 | .setTitle(`${client.allEmojis.x} Entre no meu Canal de Voz!`) 57 | .setDescription(`<#${guild.me.voice.channel.id}>`) 58 | ], 59 | }); 60 | } 61 | try { 62 | let newQueue = client.distube.getQueue(guildId); 63 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 64 | embeds: [ 65 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada agora!**`) 66 | ], 67 | 68 | }) 69 | let embeds = []; 70 | let k = 10; 71 | let theSongs = newQueue.songs; 72 | //defining each Pages 73 | for (let i = 0; i < theSongs.length; i += 10) { 74 | let qus = theSongs; 75 | const current = qus.slice(i, k) 76 | let j = i; 77 | const info = current.map((track) => `**${j++} -** [\`${String(track.name).replace(/\[/igu, "{").replace(/\]/igu, "}").substr(0, 60)}\`](${track.url}) - \`${track.formattedDuration}\``).join("\n") 78 | const embed = new MessageEmbed() 79 | .setColor(ee.color) 80 | .setDescription(`${info}`) 81 | if (i < 10) { 82 | embed.setTitle(`📑 **Top ${theSongs.length > 50 ? 50 : theSongs.length} | Fila de ${guild.name}**`) 83 | embed.setDescription(`**(0) Música atual:**\n> [\`${theSongs[0].name.replace(/\[/igu, "{").replace(/\]/igu, "}")}\`](${theSongs[0].url})\n\n${info}`) 84 | } 85 | embeds.push(embed); 86 | k += 10; //Raise k to 10 87 | } 88 | embeds[embeds.length - 1] = embeds[embeds.length - 1] 89 | .setFooter(ee.footertext + `\n${theSongs.length} Músicas na fila | Duração: ${newQueue.formattedDuration}`, ee.footericon) 90 | let pages = [] 91 | for (let i = 0; i < embeds.length; i += 3) { 92 | pages.push(embeds.slice(i, i + 3)); 93 | } 94 | pages = pages.slice(0, 24) 95 | const Menu = new MessageSelectMenu() 96 | .setCustomId("QUEUEPAGES") 97 | .setPlaceholder("Selecione uma página") 98 | .addOptions([ 99 | pages.map((page, index) => { 100 | let Obj = {}; 101 | Obj.label = `Página ${index}` 102 | Obj.value = `${index}`; 103 | Obj.description = `Mostra o ${index}/${pages.length - 1} Página!` 104 | return Obj; 105 | }) 106 | ]) 107 | const row = new MessageActionRow().addComponents([Menu]) 108 | message.reply({ 109 | embeds: [embeds[0]], 110 | components: [row], 111 | }); 112 | //Event 113 | client.on('interactionCreate', (i) => { 114 | if (!i.isSelectMenu()) return; 115 | if (i.customId === "QUEUEPAGES" && i.applicationId == client.user.id) { 116 | i.reply({ 117 | embeds: pages[Number(i.values[0])], 118 | }).catch(e => {}) 119 | } 120 | }); 121 | } catch (e) { 122 | console.log(e.stack ? e.stack : e) 123 | message.reply({ 124 | content: `${client.allEmojis.x} | Error: `, 125 | embeds: [ 126 | new MessageEmbed().setColor(ee.wrongcolor) 127 | .setDescription(`\`\`\`${e}\`\`\``) 128 | ], 129 | 130 | }) 131 | } 132 | } catch (e) { 133 | console.log(String(e.stack).bgRed) 134 | } 135 | } 136 | } -------------------------------------------------------------------------------- /dashboard/public/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); 2 | *{ 3 | box-sizing: border-box; 4 | text-decoration: none; 5 | font-family: 'Poppins', sans-serif; 6 | } 7 | .wrapper{ 8 | background: #00BFFF; 9 | position: fixed; 10 | width: 100%; 11 | } 12 | .wrapper nav{ 13 | position: relative; 14 | display: flex; 15 | max-width: calc(100% - 200px); 16 | margin: 0 auto; 17 | height: 70px; 18 | align-items: center; 19 | justify-content: space-between; 20 | } 21 | nav .content{ 22 | display: flex; 23 | align-items: flex-start; 24 | margin-top: 25px; 25 | margin-left: -130px; 26 | } 27 | nav .content .links{ 28 | margin-left: 80px; 29 | display: flex; 30 | } 31 | .content .links li{ 32 | list-style: none; 33 | line-height: 70px; 34 | } 35 | .content .links li a, 36 | .content .links li label{ 37 | color: #000617; 38 | text-transform: uppercase; 39 | font-size: 15px; 40 | font-weight: 500; 41 | padding: 9px 17px; 42 | border-radius: 5px; 43 | text-decoration: none; 44 | transition: all 0.3s ease; 45 | } 46 | 47 | .links li a:hover{ 48 | color: #00bfff; 49 | } 50 | .content .links li label{ 51 | display: none; 52 | } 53 | .content .links li a:hover, 54 | .content .links li label:hover{ 55 | background: #000617; 56 | } 57 | .wrapper .menu-icon{ 58 | display: none; 59 | } 60 | .wrapper input[type="checkbox"]{ 61 | display: none; 62 | } 63 | 64 | /* Dropdown Menu code start */ 65 | .content .links ul{ 66 | position: absolute; 67 | background: #171c24; 68 | top: 80px; 69 | z-index: -1; 70 | opacity: 0; 71 | visibility: hidden; 72 | } 73 | .content .links li:hover > ul{ 74 | top: 70px; 75 | opacity: 1; 76 | visibility: visible; 77 | transition: all 0.3s ease; 78 | } 79 | .content .links ul li a{ 80 | display: block; 81 | width: 100%; 82 | line-height: 30px; 83 | border-radius: 0px!important; 84 | } 85 | .content .links ul ul{ 86 | position: absolute; 87 | top: 0; 88 | right: calc(-100% + 8px); 89 | } 90 | .content .links ul li{ 91 | position: relative; 92 | } 93 | .content .links ul li:hover ul{ 94 | top: 0; 95 | } 96 | 97 | /* Responsive code start */ 98 | @media screen and (max-width: 1250px){ 99 | .wrapper nav{ 100 | max-width: 100%; 101 | padding: 0 20px; 102 | } 103 | nav .content .links{ 104 | margin-left: -10px; 105 | } 106 | .content .links li a{ 107 | padding: 8px 13px; 108 | } 109 | .wrapper .search-box{ 110 | max-width: calc(100% - 100px); 111 | } 112 | .wrapper .search-box input{ 113 | padding: 0 100px 0 15px; 114 | } 115 | } 116 | 117 | @media screen and (max-width: 900px){ 118 | .wrapper .menu-icon{ 119 | display: block; 120 | } 121 | .wrapper #show-menu:checked ~ .menu-icon i::before{ 122 | content: "\f00d"; 123 | } 124 | .content .links li a:hover, 125 | .content .links li label:hover{ 126 | background: #00bfff; 127 | } 128 | nav .content .links{ 129 | display: block; 130 | position: fixed; 131 | background: #000617; 132 | height: 100%; 133 | width: 100%; 134 | top: 70px; 135 | left: -100%; 136 | margin-left: 0; 137 | max-width: 350px; 138 | overflow-y: auto; 139 | padding-bottom: 100px; 140 | transition: all 0.3s ease; 141 | } 142 | nav #show-menu:checked ~ .content .links{ 143 | left: 0%; 144 | } 145 | .content .links li{ 146 | margin: 15px 20px; 147 | } 148 | 149 | .content .links li a, 150 | .content .links li label{ 151 | line-height: 40px; 152 | font-size: 20px; 153 | color: #00bfff; 154 | display: block; 155 | padding: 8px 18px; 156 | cursor: pointer; 157 | text-decoration: none; 158 | } 159 | .content .links li a:hover{ 160 | color: #000617; 161 | } 162 | .content .links li a.desktop-link{ 163 | display: none; 164 | } 165 | 166 | /* dropdown responsive code start */ 167 | .content .links ul, 168 | .content .links ul ul{ 169 | position: static; 170 | opacity: 1; 171 | visibility: visible; 172 | background: none; 173 | max-height: 0px; 174 | overflow: hidden; 175 | } 176 | .content .links #show-features:checked ~ ul, 177 | .content .links #show-services:checked ~ ul, 178 | .content .links #show-items:checked ~ ul{ 179 | max-height: 100vh; 180 | } 181 | .content .links ul li{ 182 | margin: 7px 20px; 183 | } 184 | .content .links ul li a{ 185 | font-size: 18px; 186 | line-height: 30px; 187 | border-radius: 5px!important; 188 | } 189 | } 190 | 191 | @media screen and (max-width: 400px){ 192 | .wrapper nav{ 193 | padding: 0 10px; 194 | } 195 | .content .logo a{ 196 | font-size: 27px; 197 | } 198 | .wrapper .search-box{ 199 | max-width: calc(100% - 70px); 200 | } 201 | .wrapper .search-box .go-icon{ 202 | width: 30px; 203 | right: 0; 204 | } 205 | .wrapper .search-box input{ 206 | padding-right: 30px; 207 | } 208 | } 209 | 210 | .dummy-text{ 211 | position: absolute; 212 | top: 50%; 213 | left: 50%; 214 | width: 100%; 215 | z-index: -1; 216 | padding: 0 20px; 217 | text-align: center; 218 | transform: translate(-50%, -50%); 219 | } 220 | .dummy-text h2{ 221 | font-size: 45px; 222 | margin: 5px 0; 223 | } -------------------------------------------------------------------------------- /commands/Fila/loop.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed, 3 | Message 4 | } = require("discord.js"); 5 | const config = require("../../botconfig/config.json"); 6 | const ee = require("../../botconfig/embed.json"); 7 | const settings = require("../../botconfig/settings.json"); 8 | const { 9 | check_if_dj 10 | } = require("../../handlers/functions") 11 | module.exports = { 12 | name: "loop", //the command name for the Slash Command 13 | 14 | category: "Fila", 15 | aliases: ["repeat", "repeatmode", "l"], 16 | usage: "loop ", 17 | 18 | description: "Ativar/desativar o Song-/ Queue-Loop", //the command description for Slash Command Overview 19 | cooldown: 5, 20 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 21 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 22 | run: async (client, message, args) => { 23 | try { 24 | //things u can directly access in an interaction! 25 | const { 26 | member, 27 | channelId, 28 | guildId, 29 | applicationId, 30 | commandName, 31 | deferred, 32 | replied, 33 | ephemeral, 34 | options, 35 | id, 36 | createdTimestamp 37 | } = message; 38 | const { 39 | guild 40 | } = member; 41 | const { 42 | channel 43 | } = member.voice; 44 | if (!channel) return message.reply({ 45 | embeds: [ 46 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Por favor Junte-se ${guild.me.voice.channel ? "__ao meu__" : "a um"} Canal de Voz primeiro!**`) 47 | ], 48 | 49 | }) 50 | if (channel.guild.me.voice.channel && channel.guild.me.voice.channel.id != channel.id) { 51 | return message.reply({ 52 | embeds: [new MessageEmbed() 53 | .setColor(ee.wrongcolor) 54 | .setFooter(ee.footertext, ee.footericon) 55 | .setTitle(`${client.allEmojis.x} Entre no meu Canal de Voz primeiro!`) 56 | .setDescription(`<#${guild.me.voice.channel.id}>`) 57 | ], 58 | }); 59 | } 60 | try { 61 | let newQueue = client.distube.getQueue(guildId); 62 | if (!newQueue || !newQueue.songs || newQueue.songs.length == 0) return message.reply({ 63 | embeds: [ 64 | new MessageEmbed().setColor(ee.wrongcolor).setTitle(`${client.allEmojis.x} **Eu não estou tocando nada!**`) 65 | ], 66 | 67 | }) 68 | if (check_if_dj(client, member, newQueue.songs[0])) { 69 | return message.reply({ 70 | embeds: [new MessageEmbed() 71 | .setColor(ee.wrongcolor) 72 | .setFooter(ee.footertext, ee.footericon) 73 | .setTitle(`${client.allEmojis.x} **Você não é um DJ e não é o Song Requester!**`) 74 | .setDescription(`**CARGO-DJ:**\n> ${check_if_dj(client, member, newQueue.songs[0])}`) 75 | ], 76 | }); 77 | } 78 | if (!args[0]) { 79 | return message.reply({ 80 | embeds: [new MessageEmbed() 81 | .setColor(ee.wrongcolor) 82 | .setFooter(ee.footertext, ee.footericon) 83 | .setTitle(`${client.allEmojis.x} **Adicione opções válidas!**`) 84 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}loop \``) 85 | ], 86 | }); 87 | } 88 | let loop = String(args[0]) 89 | if (!["off", "song", "queue"].includes(loop.toLowerCase())) { 90 | return message.reply({ 91 | embeds: [new MessageEmbed() 92 | .setColor(ee.wrongcolor) 93 | .setFooter(ee.footertext, ee.footericon) 94 | .setTitle(`${client.allEmojis.x} **Adicione opções válidas!**`) 95 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}loop \``) 96 | ], 97 | }); 98 | } 99 | if (loop.toLowerCase() == "off") loop = 0; 100 | else if (loop.toLowerCase() == "song") loop = 1; 101 | else if (loop.toLowerCase() == "queue") loop = 2; 102 | await newQueue.setRepeatMode(loop); 103 | if (newQueue.repeatMode == 0) { 104 | message.reply({ 105 | embeds: [new MessageEmbed() 106 | .setColor(ee.color) 107 | .setTimestamp() 108 | .setTitle(`${client.allEmojis.x} **Desativou o modo de loop!**`) 109 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 110 | }) 111 | } else if (newQueue.repeatMode == 1) { 112 | message.reply({ 113 | embeds: [new MessageEmbed() 114 | .setColor(ee.color) 115 | .setTimestamp() 116 | .setTitle(`🔁 **Habilitou o __Loop__- Música** || (Desabilitou o **Loop-Fila**)||`) 117 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 118 | }) 119 | } else { 120 | message.reply({ 121 | embeds: [new MessageEmbed() 122 | .setColor(ee.color) 123 | .setTimestamp() 124 | .setTitle(`🔂 **Habilitou o __Loop__-Fila! ** || (Desabilitou o ** __Loop-Música__**)||`) 125 | .setFooter(`Ação por: ${member.user.tag}`, member.user.displayAvatarURL({dynamic: true}))] 126 | }) 127 | } 128 | } catch (e) { 129 | console.log(e.stack ? e.stack : e) 130 | message.reply({ 131 | content: `${client.allEmojis.x} | Error: `, 132 | embeds: [ 133 | new MessageEmbed().setColor(ee.wrongcolor) 134 | .setDescription(`\`\`\`${e}\`\`\``) 135 | ], 136 | 137 | }) 138 | } 139 | } catch (e) { 140 | console.log(String(e.stack).bgRed) 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /commands/Configurações/dj.js: -------------------------------------------------------------------------------- 1 | const { 2 | MessageEmbed 3 | } = require("discord.js"); 4 | const config = require("../../botconfig/config.json"); 5 | const ee = require("../../botconfig/embed.json"); 6 | const settings = require("../../botconfig/settings.json"); 7 | module.exports = { 8 | name: "dj", //the command name for execution & for helpcmd [OPTIONAL] 9 | 10 | category: "Configurações", 11 | aliases: ["djrole", "role", "drole", "djs", "dj-role"], 12 | Use: "dj <@Role>", 13 | 14 | cooldown: 1, //the command cooldown for execution & for helpcmd [OPTIONAL] 15 | description: "Gerencia os Djs!", //the command description for helpcmd [OPTIONAL] 16 | memberpermissions: ["MANAGE_GUILD "], //Only allow members with specific Permissions to execute a Commmand [OPTIONAL] 17 | requiredroles: [], //Only allow specific Users with a Role to execute a Command [OPTIONAL] 18 | alloweduserids: [], //Only allow specific Users to execute a Command [OPTIONAL] 19 | run: async (client, message, args) => { 20 | try { 21 | //things u can directly access in an interaction! 22 | const { 23 | member, 24 | channelId, 25 | guildId, 26 | applicationId, 27 | commandName, 28 | deferred, 29 | replied, 30 | ephemeral, 31 | options, 32 | id, 33 | createdTimestamp 34 | } = message; 35 | const { 36 | guild 37 | } = member; 38 | if (!args[0]) { 39 | return message.reply({ 40 | embeds: [new MessageEmbed() 41 | .setColor(ee.wrongcolor) 42 | .setFooter(ee.footertext, ee.footericon) 43 | .setTitle(`${client.allEmojis.x} **Adicione um Método + Função!**`) 44 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}botchat <@Role>\``) 45 | ], 46 | }); 47 | } 48 | let add_remove = args[0].toLowerCase(); 49 | if (!["add", "remover"].includes(add_remove)) { 50 | return message.reply({ 51 | embeds: [new MessageEmbed() 52 | .setColor(ee.wrongcolor) 53 | .setFooter(ee.footertext, ee.footericon) 54 | .setTitle(`${client.allEmojis.x} **Adicione um Método + Função!**`) 55 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}botchat <@Role>\``) 56 | ], 57 | }); 58 | } 59 | let Role = message.mentions.channels.first(); 60 | if (!Role) { 61 | return message.reply({ 62 | embeds: [new MessageEmbed() 63 | .setColor(ee.wrongcolor) 64 | .setFooter(ee.footertext, ee.footericon) 65 | .setTitle(`${client.allEmojis.x} **Adicione um Método + Função!**`) 66 | .setDescription(`**Use:**\n> \`${client.settings.get(message.guild.id, "prefix")}botchat <@Role>\``) 67 | ], 68 | }); 69 | } 70 | client.settings.ensure(guild.id, { 71 | djroles: [] 72 | }); 73 | if (add_remove == "add") { 74 | if (client.settings.get(guild.id, "djroles").includes(Role.id)) { 75 | return message.reply({ 76 | embeds: [ 77 | new MessageEmbed() 78 | .setColor(ee.wrongcolor) 79 | .setFooter(ee.footertext, ee.footericon) 80 | .setTitle(`${client.allEmojis.x} **Este cargo já é um CARGO-DJ!**`) 81 | ], 82 | }) 83 | } 84 | client.settings.push(guild.id, Role.id, "djroles"); 85 | var djs = client.settings.get(guild.id, `djroles`).map(r => `<@&${r}>`); 86 | if (djs.length == 0) djs = "`não configurado"; 87 | else djs.join(", "); 88 | return message.reply({ 89 | embeds: [ 90 | new MessageEmbed() 91 | .setColor(ee.color) 92 | .setFooter(ee.footertext, ee.footericon) 93 | .setTitle(`${client.allEmojis.check_mark} **Um cargo \`${Role.name}\` foi adicionado ao ${client.settings.get(guild.id, "djroles").length - 1} CARGO-DJ!**`) 94 | .addField(`**CARGO-DJ${client.settings.get(guild.id, "djroles").length > 1 ? "s": ""}:**`, `>>> ${djs}`, true) 95 | ], 96 | }) 97 | } else { 98 | if (!client.settings.get(guild.id, "djroles").includes(Role.id)) { 99 | return message.reply({ 100 | embeds: [ 101 | new MessageEmbed() 102 | .setColor(ee.wrongcolor) 103 | .setFooter(ee.footertext, ee.footericon) 104 | .setTitle(`${client.allEmojis.x} **Este cargo ainda não é um CARGO-DJ!**`) 105 | ], 106 | }) 107 | } 108 | client.settings.remove(guild.id, Role.id, "djroles"); 109 | var djs = client.settings.get(guild.id, `djroles`).map(r => `<@&${r}>`); 110 | if (djs.length == 0) djs = "`não configurado`"; 111 | else djs.join(", "); 112 | return message.reply({ 113 | embeds: [ 114 | new MessageEmbed() 115 | .setColor(ee.color) 116 | .setFooter(ee.footertext, ee.footericon) 117 | .setTitle(`${client.allEmojis.check_mark} **O cargo \`${Role.name}\` foi removido do ${client.settings.get(guild.id, "djroles").length} CARGO-DJ!**`) 118 | .addField(`**CARGO-DJ${client.settings.get(guild.id, "djroles").length > 1 ? "s": ""}:**`, `>>> ${djs}`, true) 119 | ], 120 | }) 121 | } 122 | 123 | } catch (e) { 124 | console.log(String(e.stack).bgRed) 125 | } 126 | } 127 | } -------------------------------------------------------------------------------- /dashboard/views/index.ejs: -------------------------------------------------------------------------------- 1 | <%- include('header'); -%> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= bot.name %> 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

19 | <%= botClient.user.username %> | Experiência de Música definitiva 20 |

21 |
22 |
23 |

O melhor bot de música com a melhor e mais alta qualidade que você já usou!

24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 |
33 |
34 |
35 |
Todos os comandos necessários para o seu servidor
36 |

Você está cansado de ter um Bot de Música com milhares de comandos? King tem todos os comandos necessários em apenas um único bot! 37 |
Embora eles não vejam "muito", você pode usar nossas estruturas de comando para adicionar um dos <%= Object.keys(BotFilters).length %> Filtros!

38 |
39 |
40 |
41 |
42 |
43 | 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 |
Experiência de Música definitiva significa <%= Object.keys(BotFilters).length %> Filtros para ajustar o seu áudio!
52 |

Estamos usando o FFMPEG, para dar a você a mais alta qualidade de áudio possível! Na verdade, nós os geramos instantaneamente e não temos lag!

53 |
54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 |
64 |
65 |
66 |
Spotify, Soundcloud, Youtube e 1100+ outros links suportados!
67 |

Apoiamos tudo o que você ouve! INCLUINDO PLAYLISTS E 20 PLAYLISTS PREDEFINIDAS, otimizadas! (mix)

68 |
69 |
70 |
71 |
72 |
73 | 74 | 75 |
76 |
77 |
78 |
79 |
80 |
81 |
Interface clara, com logs e botões instantâneos!
82 |

Para que você possa obter tudo o que deseja instantaneamente do Bot e ver tudo o que / quem aconteceu!

83 |
84 |
85 |
86 |
87 |
88 | 89 |
90 | 91 | 92 | <%- include('footer'); -%> 93 | 94 | 95 | 96 | 97 | --------------------------------------------------------------------------------