├── .gitignore ├── config.js ├── example.env ├── index.js ├── license ├── package.json ├── readme.md ├── src ├── commands │ ├── Admins │ │ ├── clear.js │ │ ├── lock.js │ │ ├── post.js │ │ └── setup.js │ ├── Economy │ │ ├── mine.js │ │ ├── profile.js │ │ ├── register.js │ │ ├── rob.js │ │ ├── top.js │ │ ├── transfer.js │ │ ├── upgrade.js │ │ └── work.js │ ├── Fun │ │ ├── 8ball.js │ │ ├── fal.js │ │ ├── gaysanj.js │ │ ├── generate.js │ │ ├── love.js │ │ ├── rps.js │ │ └── tictactoe.js │ ├── Misc │ │ ├── help.js │ │ └── ping.js │ ├── Music │ │ ├── back.js │ │ ├── clear.js │ │ ├── filters.js │ │ ├── jump.js │ │ ├── lyrics.js │ │ ├── move.js │ │ ├── nowplaying.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── repeat.js │ │ ├── replay.js │ │ ├── resume.js │ │ ├── seek.js │ │ ├── shuffle.js │ │ ├── skip.js │ │ ├── skipto.js │ │ ├── stop.js │ │ ├── swap.js │ │ ├── trackinfo.js │ │ └── volume.js │ ├── Nsfw │ │ ├── gif.js │ │ ├── image.js │ │ └── video.js │ └── Owner │ │ ├── add.js │ │ └── setactivity.txt ├── events │ ├── command │ │ └── interactionCreate.js │ ├── guild │ │ ├── guildCreate.js │ │ ├── guildDelete.js │ │ ├── guildMemberAdd.js │ │ └── guildMemberUpdate.js │ ├── menu │ │ └── interactionCreate.js │ ├── message │ │ └── messageCreate.js │ ├── music │ │ └── interactionCreate.js │ ├── player │ │ ├── audioTrackAdd.js │ │ ├── audioTracksAdd.js │ │ ├── connection.js │ │ ├── disconnect.js │ │ ├── emptyChannel.js │ │ ├── emptyQueue.js │ │ ├── error.js │ │ ├── playerFinish.js │ │ ├── playerSkip.js │ │ └── playerStart.js │ ├── ready │ │ └── ready.js │ ├── stats │ │ └── ready.js │ └── ticket │ │ └── interactionCreate.js ├── functions │ ├── chatBot.js │ ├── editButtonIdEmote.js │ ├── editResponse.js │ ├── error.js │ ├── firstUpperCase.js │ ├── generators │ │ ├── generateFilterImage.js │ │ ├── generateMemeImage.js │ │ └── generateWelcomeImage.js │ ├── getDataFromNeko.js │ ├── getRange.js │ ├── getUserData.js │ ├── loadCommand.js │ ├── logger.js │ ├── playerDescription.js │ ├── post.js │ └── response.js ├── handlers │ ├── 1-database.js │ ├── 2-commandHandler.js │ └── 3-eventsHandler.js └── storage │ ├── copyRight.json │ ├── economy.json │ ├── eightBall.json │ ├── emotes.json │ ├── fonts │ └── Gagalin-Regular.otf │ ├── images │ ├── ad.png │ ├── affect.png │ ├── batslap.png │ ├── beautiful.png │ ├── bed.png │ ├── bobross.png │ ├── delete.png │ ├── discordblack.png │ ├── discordblue.png │ ├── doublestonk.png │ ├── facepalm.png │ ├── gay.png │ ├── spank.png │ ├── stonk.png │ ├── tatoo.png │ ├── thomas.png │ ├── trash.png │ ├── wanted.png │ └── welcomeImage.png │ ├── nsfw │ ├── anal.json │ ├── asian.json │ ├── ass.json │ ├── bdsm.json │ ├── black.json │ ├── blowjob.json │ ├── boobs.json │ ├── cosplay.json │ ├── cum.json │ ├── databaseTypes.json │ ├── facesitting.json │ ├── family.json │ ├── gay.json │ ├── hannah-owo.json │ ├── hardcore.json │ ├── hentai.json │ ├── iranian.json │ ├── lana-rhodas.json │ ├── lesbian.json │ ├── milf.json │ ├── nekoApiTypes.json │ ├── pov.json │ ├── public.json │ ├── random.json │ ├── solo.json │ ├── squirt.json │ ├── teen.json │ ├── tiktok.json │ ├── toys.json │ └── transgender.json │ └── userBadages.json └── start.bat /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | package-lock.json 4 | quickdb.json 5 | *.zip 6 | *.rar -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | const { ActivityType } = require("discord.js"); 2 | module.exports = { 3 | token: process.env.token || "", // Bot token from .env or place in here 4 | prefix: process.env.prefix || "", // Put bot message commands prefix in here. 5 | serverId: process.env.server_id || "", // Put bot main server's id in here. 6 | only_one_guild: false, // Set bot slash command to all guild or just one with placing true or false. 7 | source: { 8 | database: { 9 | type: process.env.database_type || "", // Choose one type for save users and guilds data. Types: "mysql" | "sql" | "mongodb" | "json" 10 | mongoURL: process.env.database_mongoURL || "", // If you choose "mongodb" type place your mongo url. 11 | mysql: { 12 | host: process.env.database_msql_host || "", // Place your Mysql server host name. 13 | user: process.env.database_msql_user || "", // Place your Mysql server username. 14 | password: process.env.database_msql_password || "", // Place your Mysql server password. 15 | database: process.env.database_msql_database || "" // Place your Mysql server database name. 16 | } // If you choose "mysql" type place your Mysql server information. 17 | } 18 | }, 19 | status: { 20 | activity: [ 21 | "Build by Sobhan-SRZA (mr.sinre)", 22 | "Working in {servers} Servers", 23 | "Work for {members} Members" 24 | ], // Set bot status activity, you can change it. | You can use "{members}" variable to shows bot all users. 25 | type: [ 26 | ActivityType.Custom 27 | ], // Can be: ActivityType.Competing | ActivityType.Listening | ActivityType.Playing | ActivityType.Streaming | ActivityType.Watching 28 | presence: [ 29 | "dnd" 30 | ] // Can be: "online" | "dnd" | "idle" | "offline" 31 | }, 32 | webhook: { 33 | url: process.env.webhook_url || "", // Place a webhook url in here. 34 | username: process.env.webhook_username || "Pc Bot", // Place a name for webhook in here. 35 | avatar: process.env.webhook_avatar || "https://cdn.discordapp.com/avatars/1182394110473150554/f971b4db65d5b6b031106371f70fe2ce.png" // Place a image url in here. 36 | }, 37 | owners: [ 38 | "865630940361785345", 39 | "986314682547716117", 40 | "866992479328665600" 41 | ], // Place bot developers user id in here. 42 | chat_bot: { 43 | name: "Caesar", // Place chat bot name. 44 | gender: "Male" // Place chat bot gender like example: "Male" | "Female" 45 | } 46 | }; 47 | /** 48 | * @copyright 49 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 50 | * @copyright 51 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 52 | * @copyright 53 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 54 | * @copyright 55 | */ -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | # At here place bot token like example: 2 | # token="OTI2bna9qZvCuBu9Nwm7Di4U50y6.Yc1tgA.bNJRNnS1-l537xMkVXlYjgYHK" 3 | token="" 4 | 5 | # Place bot message commands prefix in here like example: 6 | # prefix="!" 7 | prefix="" 8 | 9 | # Choose one type for save users and guilds data. Types: "mysql" | "sql" | "mongodb" | "json" 10 | # database_type="json" 11 | database_type="json" 12 | 13 | # Place bot main server's id in here like example: 14 | # server_id="1054814674979409940" 15 | server_id="" 16 | 17 | # Place a webhook url in here like example: 18 | # webhook_url="https://discord.com/api/webhooks/3187212332695885577/nJm_08irrjZOWV2QJ1mnYoa9LEqTQk1VFIdT-A_ue4hvkTvDvo7Z_6mMaGfx2C7G1D7f" 19 | webhook_url="" -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | BSD 3-Clause License 4 | 5 | Copyright (c) 2024, the respective contributors, as shown by Persian Caesar and Sobhan.SRZA (mr.sinre) file. 6 | 7 | All rights reserved. 8 | 9 | Redistribution and use in source and binary forms, with or without 10 | modification, are permitted provided that the following conditions are met: 11 | 12 | * Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | * Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | * Neither the name of the copyright holder nor the names of its 20 | contributors may be used to endorse or promote products derived from 21 | this software without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 24 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 27 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 30 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 31 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | * @returns 34 | */ 35 | // Packages 36 | require("dotenv").config(); 37 | const { 38 | Client, 39 | Collection, 40 | Partials, 41 | GatewayIntentBits 42 | } = require("discord.js"); 43 | const clc = require("cli-color"); 44 | const fs = require("fs"); 45 | const post = require("./src/functions/post.js"); 46 | const client = new Client({ 47 | intents: Object.values(GatewayIntentBits).filter(a => !isNaN(a)), 48 | partials: Object.values(Partials).filter(a => !isNaN(a)) 49 | }); 50 | const { Player } = require("discord-player"); 51 | const { YoutubeiExtractor, generateOauthTokens } = require("discord-player-youtubei"); 52 | const { DefaultExtractors } = require("@discord-player/extractor"); 53 | const player = new Player(client); 54 | (async () => { 55 | await player.extractors.loadMulti(DefaultExtractors); 56 | await player.extractors.register(YoutubeiExtractor, { 57 | authentication: await generateOauthTokens() 58 | }); 59 | })(); 60 | client.config = require("./config.js"); 61 | client.token = client.config.token; 62 | client.commands = new Collection(); 63 | client.cooldowns = new Collection(); 64 | 65 | // Load Handlers 66 | let amount = 0; 67 | const handle = fs.readdirSync("./src/handlers").filter(file => file.endsWith(".js")); 68 | const data = require("./package.json"); 69 | const error = require("./src/functions/error.js"); 70 | post( 71 | clc.cyanBright(`Welcome to ${clc.blueBright(data.name)}! | Version: ${clc.blueBright(data.version)}`) + "\n" + 72 | `Coded By ${clc.yellow(`Sobhan-SRZA`)} & ${clc.yellow(`Persian Caesar`)} With ${clc.redBright("❤️")}` + "\n" + 73 | `Discord: ${clc.blueBright(`Mr.Sinre`)} | ${clc.blueBright(`mr.sinre`)} | ${clc.blueBright(`https://dsc.gg/persian-caesar`)}`, 74 | "W", 75 | "magentaBright", 76 | "cyanBright" 77 | ); 78 | post(`Logging into the BOT...`, "S", "yellowBright", "greenBright"); 79 | handle.forEach((file) => { 80 | require(`./src/handlers/${file}`)(client); 81 | amount += 1; 82 | }); 83 | post(`${clc.cyanBright(amount)} Handler Is Loaded!!`, "S", "yellowBright", "greenBright"); 84 | 85 | // Consol 86 | if (client.token) { 87 | client.login(client.token).catch(e => { 88 | post("The Bot Token You Entered Into Your Project Is Incorrect Or Your Bot's INTENTS Are OFF!!", "E", "red", "redBright"); 89 | error(e); 90 | }); 91 | } else { 92 | post("Please Write Your Bot Token Opposite The Token In The config.js File In Your Project!!", "E", "red", "redBright"); 93 | } 94 | 95 | // Anti Crash 96 | process.on("unhandledRejection", (reason) => error(reason)); 97 | process.on("rejectionHandled", (promise) => error(promise)); 98 | process.on("uncaughtException", (e) => error(e)); 99 | process.on("uncaughtExceptionMonitor", (e) => error(e)); 100 | /** 101 | * @copyright 102 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 103 | * @copyright 104 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 105 | * @copyright 106 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 107 | * @copyright 108 | */ -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2024, Sobhan-SRZA (mr.sinre) from Persian Caesar 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "all-for-one-bot", 3 | "version": "0.0.3", 4 | "description": "This discord bot have some featrues like mini games for members, auto reaction and utility options for admins.", 5 | "main": "index.js", 6 | "license": "BSD-3-Clause", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1", 9 | "start": "node index.js" 10 | }, 11 | "dependencies": { 12 | "@discord-player/extractor": "^7.0.0-dev.4", 13 | "@napi-rs/canvas": "^0.1.45", 14 | "axios": "^1.6.7", 15 | "cli-color": "^2.0.3", 16 | "discord-api-types": "^0.37.101", 17 | "discord-gamecord": "^4.4.1", 18 | "discord-player": "^7.0.0-dev.4", 19 | "discord-player-youtubei": "^1.3.7", 20 | "discord-tictactoe": "^4.2.0", 21 | "discord.js": "^14.15.3", 22 | "dotenv": "^16.3.1", 23 | "ffmpeg-static": "^5.2.0", 24 | "jalali-moment": "^3.3.11", 25 | "jimp": "^0.22.10", 26 | "mediaplex": "^1.0.0", 27 | "prism-media": "^1.3.5", 28 | "quick.db": "^9.1.7", 29 | "write-file-atomic": "^5.0.1", 30 | "youtube-ext": "^1.1.25" 31 | } 32 | } -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # All For One Bot 2 | 3 |
4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 | This source is full discord bot and can do anything you want. 24 | 25 | --- 26 | 27 | ## Contact 28 |
29 | 30 | Sobhan-SRZA social 31 | 32 | 33 | 34 | Telegram 37 | 38 | 39 | 40 | Telegram 43 | 44 | 45 | 46 | Instagram 49 | 50 | 51 | 52 | Twitch 55 | 56 | 57 | 58 | YouTube 61 | 62 | 63 | 64 | Github 67 | 68 | 69 |

70 | 71 | pc-development.png 72 | 73 |

74 | 75 |

76 | 77 | pc-club.png 78 | 79 |

80 | 81 |
82 | 83 | My Discord Account 84 | 85 | 86 | Team Discord Account 87 | 88 |
89 | 90 |
91 | 92 | 93 | -------------------------------------------------------------------------------- /src/commands/Admins/clear.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ChannelType, 4 | ApplicationCommandType, 5 | ApplicationCommandOptionType 6 | } = require("discord.js"); 7 | const error = require("../../functions/error"); 8 | module.exports = { 9 | name: "clear", 10 | description: "پاک کردن پیام بیشتر از 100 نمیشود", 11 | category: "admin", 12 | type: ApplicationCommandType.ChatInput, 13 | user_permissions: ["ManageMessages"], 14 | bot_permissions: ["SendMessages", "EmbedLinks"], 15 | dm_permissions: false, 16 | only_owner: false, 17 | only_admin: false, 18 | only_slash: true, 19 | only_message: false, 20 | options: [{ 21 | name: "amount", 22 | description: "تعداد پاک کردن ", 23 | type: ApplicationCommandOptionType.String, 24 | required: false 25 | }, { 26 | name: "channel", 27 | description: "چنلی ک میخوای پیاماشو پاک کنی ", 28 | type: ApplicationCommandOptionType.Channel, 29 | channelTypes: [ChannelType.GuildText], 30 | required: false 31 | }], 32 | 33 | 34 | /** 35 | * 36 | * @param {import("discord.js").Client} client 37 | * @param {import("discord.js").CommandInteraction} interaction 38 | * @param {Array} args 39 | * @returns 40 | */ 41 | run: async (client, interaction) => { 42 | let channel = interaction.options.getChannel("channel") || interaction.channel; 43 | let amount = interaction.options.getString("amount") || 100; 44 | try { 45 | if (isNaN(amount)) { 46 | interaction.reply({ 47 | content: `❌| لطفا تعداد بگو`, 48 | ephemeral: true, 49 | }) 50 | } 51 | const embed = new EmbedBuilder() 52 | .setColor("Yellow") 53 | .setTitle(`⚖️| Clear Information`) 54 | .addFields({ 55 | name: `چنل`, 56 | value: `${channel}`, 57 | inline: true 58 | }, { 59 | name: `پاک شده توسط`, 60 | value: `${interaction.user}`, 61 | inline: true 62 | }) 63 | .setTimestamp(); 64 | 65 | await channel.bulkDelete(amount, true).then(async (msg) => { 66 | embed.addFields({ name: `تعداد پیام های پاک شده`, value: `${msg.size}`, inline: true }) 67 | if (msg.size === 0) { 68 | interaction.reply({ 69 | content: `**❌| پیامی برای پاک کردن پیدا نشد**`, 70 | ephemeral: true 71 | }) 72 | } 73 | return await interaction.reply({ 74 | embeds: [embed], 75 | ephemeral: true, 76 | }) 77 | }) 78 | } catch (e) { 79 | error(e) 80 | } 81 | } 82 | }; 83 | /** 84 | * @copyright 85 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 86 | * @copyright 87 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 88 | * @copyright 89 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 90 | * @copyright 91 | */ -------------------------------------------------------------------------------- /src/commands/Admins/lock.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType, 4 | ApplicationCommandOptionType 5 | } = require("discord.js"); 6 | const error = require("../../functions/error"); 7 | module.exports = { 8 | name: "lock", 9 | description: "بستن یا باز کردن یه چنل خاص", 10 | category: "admin", 11 | type: ApplicationCommandType.ChatInput, 12 | user_permissions: ["ManageChannels"], 13 | bot_permissions: ["SendMessages", "EmbedLinks"], 14 | dm_permissions: false, 15 | only_owner: false, 16 | only_admin: false, 17 | only_slash: true, 18 | only_message: false, 19 | options: [{ 20 | name: "type", 21 | description: "میخوای چنل رو ببندی یا باز کنی؟", 22 | type: ApplicationCommandOptionType.String, 23 | required: true, 24 | choices: [{ 25 | name: "Lock", 26 | value: "lock" 27 | }, { 28 | name: "Unlock", 29 | value: "unlock" 30 | }] 31 | }, { 32 | name: "role-member", 33 | description: "رولی که میخوای چتش بسته باشه", 34 | type: ApplicationCommandOptionType.Mentionable, 35 | required: false 36 | }, { 37 | name: "channel", 38 | description: "چنلی ک میخوای قفل کنی", 39 | type: ApplicationCommandOptionType.Channel, 40 | required: false 41 | }], 42 | 43 | /** 44 | * 45 | * @param {import("discord.js").Client} client 46 | * @param {import("discord.js").CommandInteraction} interaction 47 | * @param {Array} args 48 | * @returns 49 | */ 50 | run: async (client, interaction, args) => { 51 | const type = interaction.options.getString("type"); 52 | const channel = interaction.options.getChannel("channel") || interaction.channel; 53 | const role = interaction.options.getMentionable("role-member") || interaction.guild.roles.everyone; 54 | try { 55 | if (type === "lock") { 56 | channel.permissionOverwrites.edit(role.id, { 57 | SendMessages: false 58 | }); 59 | return await interaction.reply({ 60 | embeds: [new EmbedBuilder().setColor("Green").setTitle(`🔒| با موافقیت پاک شد`).addFields([{ name: `چنل`, value: `${channel}` }, { name: `فقل شده توسط`, value: `${interaction.user}` }, { name: `رول فقل شده`, value: `${role}` }]).setTimestamp()], 61 | ephemeral: true, 62 | }); 63 | } else { 64 | channel.permissionOverwrites.edit(role.id, { 65 | SendMessages: true 66 | }); 67 | return await interaction.reply({ 68 | embeds: [new EmbedBuilder().setColor("Green").setTitle(`🔓| با موفقیت باز شد`).addFields([{ name: `چنل`, value: `${channel}` }, { name: `باز شده نوسط`, value: `${interaction.user}` }, { name: `رول باز شده `, value: `${role}` }]).setTimestamp()], 69 | ephemeral: true, 70 | }) 71 | } 72 | } catch (e) { 73 | error(e) 74 | } 75 | } 76 | }; 77 | /** 78 | * @copyright 79 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 80 | * @copyright 81 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 82 | * @copyright 83 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 84 | * @copyright 85 | */ -------------------------------------------------------------------------------- /src/commands/Economy/mine.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType 4 | } = require("discord.js"); 5 | const copyRight = require("../../storage/copyRight.json"); 6 | const mineLevel = require("../../storage/economy.json").miner; 7 | const error = require("../../functions/error"); 8 | module.exports = { 9 | name: "mine", 10 | description: "ماین بیت کوین برای دریافت پول.", 11 | category: "economy", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 60 * 60, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | 21 | /** 22 | * 23 | * @param {import("discord.js").Client} client 24 | * @param {import("discord.js").CommandInteraction} interaction 25 | * @param {Array} args 26 | * @returns 27 | */ 28 | run: async (client, interaction, args) => { 29 | try { 30 | let db = client.db; 31 | if (!await db.has(`users.${interaction.user.id}`)) { 32 | await interaction.deferReply({ ephemeral: true }); 33 | let cmd = client.application.commands.cache.find(c => c.name === "register"); 34 | return await interaction.editReply({ 35 | content: `❌| شما هیچ پروفایلی در بات ندارید.\n(با استفاده از کامند برای خود پروفایل بسازید.)` 36 | }); 37 | }; 38 | 39 | let profile = await db.get(`users.${interaction.user.id}`); 40 | let cmd = client.application.commands.cache.find(c => c.name === "upgrade"); 41 | if (profile.home <= 0) { 42 | await interaction.deferReply({ ephemeral: true }); 43 | return await interaction.editReply({ 44 | content: `❌| شما نمیتوانید ماین کنید زیرا که خانه ای ندارید.\n(برای خرید خانه از کامند استفاده کنید.)` 45 | }); 46 | }; 47 | 48 | if (profile.miner <= 0) { 49 | await interaction.deferReply({ ephemeral: true }); 50 | return await interaction.editReply({ 51 | content: `❌| شما هیچ ماینری برای ماین کردن ندارید.\n(برای خرید ماینر از کامند استفاده کنید.)` 52 | }); 53 | }; 54 | 55 | await interaction.deferReply({ ephemeral: false }); 56 | await db.add(`users.${interaction.user.id}.wallet`, mineLevel[profile.miner]); 57 | let embed = new EmbedBuilder() 58 | .setColor("Green") 59 | .setTitle("Economy | Mine") 60 | .setDescription("با موفقیت همه ی بیت کوین هایی که ماین شدند فرخته شدن.") 61 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 62 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 63 | .addFields([{ 64 | name: "مبلغ واریزی:", 65 | value: `${mineLevel[profile.miner].toLocaleString()} 🪙`, 66 | inline: true 67 | }, { 68 | name: "سطح ماینر:", 69 | value: `${profile.miner} Level ⛏`, 70 | inline: true 71 | }, { 72 | name: "کیف پول:", 73 | value: `${profile.wallet.toLocaleString()} 🪙`, 74 | inline: true 75 | }]) 76 | .setTimestamp(); 77 | 78 | return await interaction.editReply({ 79 | embeds: [embed] 80 | }); 81 | } catch (e) { 82 | error(e); 83 | } 84 | } 85 | } 86 | /** 87 | * @copyright 88 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 89 | * @copyright 90 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 91 | * @copyright 92 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 93 | * @copyright 94 | */ -------------------------------------------------------------------------------- /src/commands/Economy/register.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType 4 | } = require("discord.js"); 5 | const error = require("../../functions/error"); 6 | const economy = require("../../storage/economy.json"); 7 | const copyRight = require("../../storage/copyRight.json"); 8 | module.exports = { 9 | name: "register", 10 | description: "ثبت نام و ساخت پروفایل در سیستم اکونومی بات.", 11 | category: "economy", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 10, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | 21 | /** 22 | * 23 | * @param {import("discord.js").Client} client 24 | * @param {import("discord.js").CommandInteraction} interaction 25 | * @param {Array} args 26 | * @returns 27 | */ 28 | run: async (client, interaction, args) => { 29 | try { 30 | const db = client.db; 31 | await interaction.deferReply({ ephemeral: false }); 32 | if (await db.has(`users.${interaction.user.id}`)) { 33 | const profile = await db.get(`users.${interaction.user.id}`); 34 | const embed = new EmbedBuilder() 35 | .setColor("Orange") 36 | .setTitle("Economy | Register") 37 | .setDescription("شما از قبل پروفایل داشتید.") 38 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 39 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 40 | .addFields([{ 41 | name: "کیف پول:", 42 | value: `${profile.wallet.toLocaleString()} 🪙`, 43 | inline: true 44 | }, { 45 | name: "سطح کار:", 46 | value: `${profile.work} Level 💼`, 47 | inline: true 48 | }, { 49 | name: "سطح دزدی:", 50 | value: `${profile.rob} Level 🔦`, 51 | inline: true 52 | }, { 53 | name: "سطح خانه:", 54 | value: `${profile.home} Level 🏡`, 55 | inline: true 56 | }, { 57 | name: "سطح ماینر:", 58 | value: `${profile.miner} Level ⛏`, 59 | inline: true 60 | }]) 61 | .setTimestamp(); 62 | 63 | return await interaction.editReply({ 64 | embeds: [embed] 65 | }); 66 | }; 67 | 68 | const data = { 69 | name: interaction.user.tag, 70 | wallet: economy.default_coin, 71 | miner: 0, 72 | home: 0, 73 | work: 0, 74 | rob: 0 75 | }; 76 | await db.set(`users.${interaction.user.id}`, data); 77 | const embed = new EmbedBuilder() 78 | .setColor("Green") 79 | .setTitle("Economy | Register") 80 | .setDescription("پروفایل شما با موفقیت ساخته شد.") 81 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 82 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 83 | .addFields([{ 84 | name: "کیف پول:", 85 | value: `${data.wallet.toLocaleString()} 🪙`, 86 | inline: true 87 | }, { 88 | name: "سطح کار:", 89 | value: `${data.work} Level 💼`, 90 | inline: true 91 | }, { 92 | name: "سطح دزدی:", 93 | value: `${data.rob} Level 🔦`, 94 | inline: true 95 | }, { 96 | name: "سطح خانه:", 97 | value: `${data.home} Level 🏡`, 98 | inline: true 99 | }, { 100 | name: "سطح ماینر:", 101 | value: `${data.miner} Level ⛏`, 102 | inline: true 103 | }]) 104 | .setTimestamp(); 105 | 106 | return await interaction.editReply({ 107 | embeds: [embed] 108 | }); 109 | } catch (e) { 110 | error(e); 111 | } 112 | } 113 | } 114 | /** 115 | * @copyright 116 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 117 | * @copyright 118 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 119 | * @copyright 120 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 121 | * @copyright 122 | */ -------------------------------------------------------------------------------- /src/commands/Economy/rob.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType 4 | } = require("discord.js"); 5 | const robLevel = require("../../storage/economy.json").rob; 6 | const error = require("../../functions/error"); 7 | const copyRight = require("../../storage/copyRight.json"); 8 | module.exports = { 9 | name: "rob", 10 | description: "دزدی از بانک.", 11 | category: "economy", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 60 * 60, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | 21 | /** 22 | * 23 | * @param {import("discord.js").Client} client 24 | * @param {import("discord.js").CommandInteraction} interaction 25 | * @param {Array} args 26 | * @returns 27 | */ 28 | run: async (client, interaction, args) => { 29 | try { 30 | const db = client.db; 31 | if (!await db.has(`users.${interaction.user.id}`)) { 32 | await interaction.deferReply({ ephemeral: true }); 33 | const cmd = client.application.commands.cache.find(c => c.name === "register"); 34 | return await interaction.editReply({ 35 | content: `❌| شما هیچ پروفایلی در بات ندارید.\n(با استفاده از کامند برای خود پروفایل بسازید.)` 36 | }); 37 | }; 38 | 39 | await interaction.deferReply({ ephemeral: false }); 40 | const profile = await db.get(`users.${interaction.user.id}`); 41 | const deposit = profile.rob <= 0 ? 100 : robLevel[profile.rob]; 42 | const withdrawal = Math.floor(deposit / 2); 43 | const random = Math.floor(Math.random() * 2); 44 | if (random === 0) { 45 | await db.add(`users.${interaction.user.id}.wallet`, deposit); 46 | } else { 47 | await db.sub(`users.${interaction.user.id}.wallet`, withdrawal); 48 | }; 49 | 50 | const embed = new EmbedBuilder() 51 | .setColor(random === 0 ? "Green" : "Red") 52 | .setTitle("Economy | Rob") 53 | .setDescription(random === 0 ? "شما با موفقیت بدون گیر افتادن از بانک دزدی کردید." : "شما توسط پلیس دستگیر شدید.") 54 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 55 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 56 | .addFields([{ 57 | name: random === 0 ? "مبلغ واریزی:" : "مبلغ یرداشتی:", 58 | value: `${random === 0 ? deposit.toLocaleString() : withdrawal.toLocaleString()} 🪙`, 59 | inline: true 60 | }, { 61 | name: "سطح دزدی:", 62 | value: `${profile.rob} Level 🔦`, 63 | inline: true 64 | }, { 65 | name: "کیف پول:", 66 | value: `${profile.wallet.toLocaleString()} 🪙`, 67 | inline: true 68 | }]) 69 | .setTimestamp(); 70 | 71 | return await interaction.editReply({ 72 | embeds: [embed] 73 | }); 74 | } catch (e) { 75 | error(e); 76 | } 77 | } 78 | } 79 | /** 80 | * @copyright 81 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 82 | * @copyright 83 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 84 | * @copyright 85 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 86 | * @copyright 87 | */ -------------------------------------------------------------------------------- /src/commands/Economy/transfer.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType, 4 | ApplicationCommandOptionType 5 | } = require("discord.js"); 6 | const error = require("../../functions/error"); 7 | const copyRight = require("../../storage/copyRight.json"); 8 | module.exports = { 9 | name: "transfer", 10 | description: "انتقال پول به دیگران.", 11 | category: "economy", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 60, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | options: [{ 21 | name: "cash", 22 | type: ApplicationCommandOptionType.Number, 23 | description: "مبلغ پول واریزی را بنویسید.", 24 | required: true 25 | }, { 26 | name: "user", 27 | type: ApplicationCommandOptionType.User, 28 | description: "به کی میخواهید واریز کنید؟", 29 | required: true 30 | }], 31 | 32 | /** 33 | * 34 | * @param {import("discord.js").Client} client 35 | * @param {import("discord.js").CommandInteraction} interaction 36 | * @param {Array} args 37 | * @returns 38 | */ 39 | run: async (client, interaction, args) => { 40 | try { 41 | let db = client.db; 42 | let user = interaction.options.getUser("user"); 43 | let cash = interaction.options.getNumber("cash"); 44 | if (!await db.has(`users.${interaction.user.id}`)) { 45 | await interaction.deferReply({ ephemeral: true }); 46 | let cmd = client.application.commands.cache.find(c => c.name === "register"); 47 | return await interaction.editReply({ 48 | content: `❌| شما هیچ پروفایلی در بات ندارید.\n(با استفاده از کامند برای خود پروفایل بسازید.)` 49 | }); 50 | }; 51 | 52 | if (interaction.user.equals(user)) { 53 | await interaction.deferReply({ ephemeral: true }); 54 | return await interaction.editReply({ 55 | content: `❌| شما نمیتوانید به خودتان پول واریز کنید.` 56 | }); 57 | }; 58 | 59 | if (user.bot) { 60 | await interaction.deferReply({ ephemeral: true }); 61 | return await interaction.editReply({ 62 | content: `❌| ربات ها نمیتوانند پروفایل داشته باشند.` 63 | }); 64 | }; 65 | 66 | 67 | if (!await db.has(`users.${user.id}`)) { 68 | await interaction.deferReply({ ephemeral: true }); 69 | return await interaction.editReply({ 70 | content: `❌| یوزر مورد نظر پروفایلی در بات ندارد.` 71 | }); 72 | }; 73 | 74 | const profile = await db.get(`users.${interaction.user.id}`); 75 | if (profile.wallet < cash) { 76 | await interaction.deferReply({ ephemeral: true }); 77 | return await interaction.editReply({ 78 | content: `❌| شما پول کافی برای واریز به حساب ${user} را ندارید.\n(شما فقط \`${profile.wallet.toLocaleString()}\`🪙 دارید.)` 79 | }); 80 | }; 81 | 82 | await interaction.deferReply({ ephemeral: false }); 83 | await db.sub(`users.${interaction.user.id}.wallet`, cash); 84 | await db.add(`users.${user.id}.wallet`, cash); 85 | const embed = new EmbedBuilder() 86 | .setColor("Yellow") 87 | .setTitle("Economy | Transfer") 88 | .setDescription("باموفقیت پول از حساب شما برداشت و به حساب یوزر مورد نظر واریز شد.") 89 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 90 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 91 | .addFields([{ 92 | name: "مبلغ برداشتی:", 93 | value: `${cash.toLocaleString()} 🪙`, 94 | inline: true 95 | }, { 96 | name: "یوزر:", 97 | value: `${user}`, 98 | inline: true 99 | }, { 100 | name: "کیف پول:", 101 | value: `${profile.wallet.toLocaleString()} 🪙`, 102 | inline: true 103 | }]) 104 | .setTimestamp(); 105 | 106 | return await interaction.editReply({ 107 | embeds: [embed] 108 | }); 109 | } catch (e) { 110 | error(e); 111 | } 112 | } 113 | } 114 | /** 115 | * @copyright 116 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 117 | * @copyright 118 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 119 | * @copyright 120 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 121 | * @copyright 122 | */ -------------------------------------------------------------------------------- /src/commands/Economy/work.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType 4 | } = require("discord.js"); 5 | const workLevel = require("../../storage/economy.json").work; 6 | const error = require("../../functions/error"); 7 | const copyRight = require("../../storage/copyRight.json"); 8 | module.exports = { 9 | name: "work", 10 | description: "انجام کار و دریافت حقوق.", 11 | category: "economy", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 60 * 60, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | 21 | /** 22 | * 23 | * @param {import("discord.js").Client} client 24 | * @param {import("discord.js").CommandInteraction} interaction 25 | * @param {Array} args 26 | * @returns 27 | */ 28 | run: async (client, interaction, args) => { 29 | try { 30 | const db = client.db; 31 | if (!await db.has(`users.${interaction.user.id}`)) { 32 | await interaction.deferReply({ ephemeral: true }); 33 | const cmd = client.application.commands.cache.find(c => c.name === "register"); 34 | return await interaction.editReply({ 35 | content: `❌| شما هیچ پروفایلی در بات ندارید.\n(با استفاده از کامند برای خود پروفایل بسازید.)` 36 | }); 37 | }; 38 | 39 | await interaction.deferReply({ ephemeral: false }); 40 | const profile = await db.get(`users.${interaction.user.id}`); 41 | const deposit = profile.work <= 0 ? 200 : workLevel[profile.work]; 42 | await db.add(`users.${interaction.user.id}.wallet`, deposit); 43 | const embed = new EmbedBuilder() 44 | .setColor("Green") 45 | .setTitle("Economy | Work") 46 | .setDescription("شما با موفقیت تایم کاری خود را انجام دادید!!") 47 | .setFooter({ text: `Economy Embed • ${copyRight.footerText}` }) 48 | .setThumbnail(interaction.user.displayAvatarURL({ forceStatic: true })) 49 | .addFields([{ 50 | name: "مبلغ واریزی:", 51 | value: `${deposit.toLocaleString()} 🪙`, 52 | inline: true 53 | }, { 54 | name: "سطح کار:", 55 | value: `${profile.work} Level 💼`, 56 | inline: true 57 | }, { 58 | name: "کیف پول:", 59 | value: `${profile.wallet.toLocaleString()} 🪙`, 60 | inline: true 61 | }]) 62 | .setTimestamp(); 63 | 64 | return await interaction.editReply({ 65 | embeds: [embed] 66 | }); 67 | } catch (e) { 68 | error(e); 69 | } 70 | } 71 | } 72 | /** 73 | * @copyright 74 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 75 | * @copyright 76 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 77 | * @copyright 78 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 79 | * @copyright 80 | */ -------------------------------------------------------------------------------- /src/commands/Fun/8ball.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType, 4 | ApplicationCommandOptionType 5 | } = require("discord.js"); 6 | const eightball = require("../../storage/eightBall.json"); 7 | const copyRight = require("../../storage/copyRight.json"); 8 | const error = require("../../functions/error"); 9 | module.exports = { 10 | name: "8ball", 11 | description: "من توپ شانسم هر سوالی ازم داری بپرس.", 12 | category: "fun", 13 | type: ApplicationCommandType.ChatInput, 14 | cooldown: 5, 15 | user_permissions: ["SendMessages"], 16 | bot_permissions: ["SendMessages", "EmbedLinks"], 17 | dm_permissions: false, 18 | only_owner: false, 19 | only_slash: true, 20 | only_message: false, 21 | options: [{ 22 | name: "question", 23 | description: "سوال خود را بنویسید.", 24 | type: ApplicationCommandOptionType.String, 25 | required: true 26 | }], 27 | 28 | /** 29 | * 30 | * @param {import("discord.js").Client} client 31 | * @param {import("discord.js").CommandInteraction} interaction 32 | * @param {Array} args 33 | * @returns 34 | */ 35 | run: async (client, interaction, args) => { 36 | try { 37 | const question = interaction.options.getString("question"); 38 | await interaction.deferReply({ ephemeral: false }); 39 | const answer = eightball[Math.floor(Math.random() * Math.floor(eightball.length))]; 40 | return await interaction.editReply({ 41 | embeds: [new EmbedBuilder().setColor("Blue").setAuthor({ name: `درخواست شده توسط ${interaction.user.username}`, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) }).setTitle(`🎱| 8ball`).addFields({ name: "سوال:", value: question }, { name: "جواب:", value: answer }).setFooter({ text: `${copyRight.footerText}`, iconURL: copyRight.footerIcon })] 42 | }); 43 | } catch (e) { 44 | error(e); 45 | } 46 | } 47 | } 48 | /** 49 | * @copyright 50 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 51 | * @copyright 52 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 53 | * @copyright 54 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 55 | * @copyright 56 | */ -------------------------------------------------------------------------------- /src/commands/Fun/fal.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ButtonStyle, 4 | ActionRowBuilder, 5 | ButtonBuilder, 6 | ApplicationCommandType 7 | } = require("discord.js"); 8 | const error = require("../../functions/error"); 9 | const axios = require("axios"); 10 | module.exports = { 11 | name: "fal", 12 | description: "اول نیت کن بعدش این کامند رو ران کن.", 13 | category: "fun", 14 | cooldown: 5, 15 | type: ApplicationCommandType.ChatInput, 16 | user_permissions: ["SendMessages"], 17 | bot_permissions: ["SendMessages", "EmbedLinks"], 18 | dm_permissions: false, 19 | only_owner: false, 20 | only_slash: true, 21 | only_message: false, 22 | 23 | /** 24 | * 25 | * @param {import("discord.js").Client} client 26 | * @param {import("discord.js").CommandInteraction} interaction 27 | * @param {Array} args 28 | * @returns 29 | */ 30 | run: async (client, interaction, args) => { 31 | try { 32 | const res = await axios.get(`https://api.falehafez.org/`); 33 | const poem = res.data.poem.join(` / `); 34 | const explain = res.data.explanation; 35 | return await interaction.reply({ 36 | embeds: [new EmbedBuilder().setColor('Yellow').setTitle(`📖| فال حافظ`).setDescription(`نیت کن و بعد کلیک کن`)], 37 | components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setCustomId("fun-falhafez").setLabel(`گرفتن فال`).setEmoji(`🔖`).setStyle(ButtonStyle.Primary))], 38 | fetchReply: true 39 | }).then((msg) => { 40 | const collector = msg.createMessageComponentCollector({ time: 30 * 1000 }); 41 | collector.on("collect", async (m) => { 42 | if (m.user.id !== interaction.user.id) m.reply({ content: `این فال برای شما نیست`, ephemeral: true }); 43 | if (m.customId === "fun-falhafez") { 44 | m.update({ 45 | embeds: [new EmbedBuilder().setColor('Aqua').setTitle(`📖| فال حافظ`).addFields([{ name: `شعر:`, value: `${poem}` }, { name: `معنی:`, value: `${explain}` }]).setImage("https://cdn.discordapp.com/attachments/944668553439760434/1098229688352129034/image.jpeg")], 46 | components: [] 47 | }) 48 | } 49 | }); 50 | collector.on("end", () => { 51 | msg.edit({ 52 | components: [] 53 | }) 54 | }); 55 | }) 56 | } catch (e) { 57 | error(e); 58 | } 59 | } 60 | } 61 | /** 62 | * @copyright 63 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 64 | * @copyright 65 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 66 | * @copyright 67 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 68 | * @copyright 69 | */ -------------------------------------------------------------------------------- /src/commands/Fun/gaysanj.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | AttachmentBuilder, 4 | ApplicationCommandType, 5 | ApplicationCommandOptionType 6 | } = require("discord.js"); 7 | const error = require("../../functions/error"); 8 | const copyRight = require("../../storage/copyRight.json"); 9 | const generate = require("../../functions/generators/generateFilterImage"); 10 | const point = require("../../functions/getRange"); 11 | module.exports = { 12 | name: "gaysanj", 13 | description: "میزان گی بودنت رو میسنجم.", 14 | category: "fun", 15 | aliases: ["gay"], 16 | type: ApplicationCommandType.ChatInput, 17 | cooldown: 5, 18 | user_permissions: ["SendMessages"], 19 | bot_permissions: ["SendMessages", "EmbedLinks"], 20 | dm_permissions: false, 21 | only_owner: false, 22 | only_slash: true, 23 | only_message: false, 24 | options: [{ 25 | name: "user", 26 | type: ApplicationCommandOptionType.User, 27 | description: "یک یوزر انتخاب کنید.", 28 | required: false 29 | }], 30 | 31 | /** 32 | * 33 | * @param {import("discord.js").Client} client 34 | * @param {import("discord.js").CommandInteraction} interaction 35 | * @param {Array} args 36 | * @returns 37 | */ 38 | run: async (client, interaction, args) => { 39 | try { 40 | const user = interaction.options.getUser("user") || interaction.user; 41 | const number = Math.floor(Math.random() * 100) + 1; 42 | const files = []; 43 | const embed = new EmbedBuilder() 44 | .setColor("Orange") 45 | .setDescription(number > 50 ? `به به پرچمت رنگیه مشتی ${user} یا حق.` : `خب داشم ${user} کونی نیستی خداتو شکر کن.`) 46 | .setAuthor({ name: `درخواست شده توسط ${interaction.user.username}`, iconURL: interaction.user.displayAvatarURL({ forceStatic: true }) }) 47 | .setFooter({ text: copyRight.footerText, iconURL: copyRight.footerIcon }) 48 | .addFields({ 49 | name: "درصد گی بودن:", 50 | value: `**\`${number}%\`**` 51 | }, { 52 | name: "درجه نگار:", 53 | value: `**${point(number)}**` 54 | }); 55 | 56 | if (number > 50) { 57 | const image = new generate().setUserAvatar(user.displayAvatarURL({ extension: "png", size: 4096 })).setGay(true); 58 | embed.setThumbnail("attachment://gay.png"); 59 | files.push(new AttachmentBuilder(await image.generate(), { name: "gay.png" })); 60 | } else embed.setThumbnail(user.displayAvatarURL({ extension: "png", size: 4096 })); 61 | 62 | return await interaction.reply({ 63 | embeds: [embed], 64 | files: files 65 | }); 66 | } catch (e) { 67 | error(e); 68 | } 69 | } 70 | } 71 | /** 72 | * @copyright 73 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 74 | * @copyright 75 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 76 | * @copyright 77 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 78 | * @copyright 79 | */ -------------------------------------------------------------------------------- /src/commands/Fun/love.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandOptionType, 4 | ApplicationCommandType 5 | } = require("discord.js"); 6 | const copyRight = require("../../storage/copyRight.json"); 7 | const error = require("../../functions/error"); 8 | module.exports = { 9 | name: "love", 10 | description: "میزان عشق و علاقت نسبت به یکی رو میسنجم.", 11 | category: "fun", 12 | cooldown: 5, 13 | type: ApplicationCommandType.ChatInput, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: false, 20 | options: [{ 21 | name: "user", 22 | type: ApplicationCommandOptionType.User, 23 | description: "یک یوزر انتخاب کنید.", 24 | required: true 25 | }], 26 | 27 | /** 28 | * 29 | * @param {import("discord.js").Client} client 30 | * @param {import("discord.js").CommandInteraction} interaction 31 | * @param {Array} args 32 | * @returns 33 | */ 34 | run: async (client, interaction, args) => { 35 | try { 36 | const target = interaction.options.getUser("user"); 37 | if (target.id === interaction.user.id) return interaction.reply("**لطفا یکی دیگه را منشن کنید**") 38 | const random = Math.floor(Math.random() * 99) + 1; 39 | const embed = new EmbedBuilder().setColor("Purple").setDescription(`**${interaction.user}** درصد عشق شما به **${target}**, **%${random}** است`).setFooter({ text: `درخواست شده توسط ${interaction.user.username} • ${copyRight.footerText}`, iconURL: copyRight.footerIcon }); 40 | if (random >= 50) { 41 | embed.setThumbnail('https://cdn.discordapp.com/attachments/944668553439760434/1098155294707695616/image.png') 42 | } else { 43 | embed.setThumbnail('https://cdn.discordapp.com/attachments/944668553439760434/1098155295320051812/image.png') 44 | } 45 | setTimeout(() => { 46 | interaction.reply({ 47 | embeds: [embed] 48 | }) 49 | }, 1000) 50 | } catch (e) { 51 | error(e); 52 | } 53 | } 54 | } 55 | /** 56 | * @copyright 57 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 58 | * @copyright 59 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 60 | * @copyright 61 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 62 | * @copyright 63 | */ -------------------------------------------------------------------------------- /src/commands/Fun/tictactoe.js: -------------------------------------------------------------------------------- 1 | const { 2 | ApplicationCommandType, 3 | ApplicationCommandOptionType 4 | } = require("discord.js"); 5 | const { 6 | TicTacToe 7 | } = require('discord-gamecord'); 8 | const tictactoe = require("discord-tictactoe"); 9 | const error = require("../../functions/error"); 10 | module.exports = { 11 | name: "tictactoe", 12 | description: "بازی دوز دوز.", 13 | category: "fun", 14 | cooldown: 5, 15 | type: ApplicationCommandType.ChatInput, 16 | user_permissions: ["SendMessages"], 17 | bot_permissions: ["SendMessages", "EmbedLinks"], 18 | dm_permissions: false, 19 | only_owner: false, 20 | only_slash: true, 21 | only_message: false, 22 | options: [{ 23 | name: "user", 24 | type: ApplicationCommandOptionType.User, 25 | description: "یک یوزر انتخاب کنید.", 26 | required: false 27 | }], 28 | 29 | /** 30 | * 31 | * @param {import("discord.js").Client} client 32 | * @param {import("discord.js").CommandInteraction} interaction 33 | * @param {Array} args 34 | * @returns 35 | */ 36 | run: async (client, interaction, args) => { 37 | try { 38 | const user = interaction.options.getUser("user"); 39 | if (user) { 40 | const Game = new TicTacToe({ message: interaction, isSlashGame: true, opponent: user }); 41 | Game.startGame(); 42 | } else { 43 | const Game = new tictactoe({ language: "en", commandOptionName: "rival" }); 44 | Game.handleInteraction(interaction); 45 | } 46 | } catch (e) { 47 | error(e); 48 | } 49 | } 50 | } 51 | /** 52 | * @copyright 53 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 54 | * @copyright 55 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 56 | * @copyright 57 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 58 | * @copyright 59 | */ -------------------------------------------------------------------------------- /src/commands/Misc/ping.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ApplicationCommandType 4 | } = require("discord.js"); 5 | const response = require("../../functions/response"); 6 | const error = require("../../functions/error"); 7 | const editResponse = require("../../functions/editResponse"); 8 | module.exports = { 9 | name: "ping", 10 | description: "پینگ بات", 11 | category: "misc", 12 | type: ApplicationCommandType.ChatInput, 13 | cooldown: 5, 14 | user_permissions: ["SendMessages"], 15 | bot_permissions: ["SendMessages", "EmbedLinks"], 16 | dm_permissions: false, 17 | only_owner: false, 18 | only_slash: true, 19 | only_message: true, 20 | 21 | /** 22 | * 23 | * @param {import("discord.js").Client} client 24 | * @param {import("discord.js").CommandInteraction} interaction 25 | * @param {Array} args 26 | * @returns 27 | */ 28 | run: async (client, interaction, args) => { 29 | const embed1 = new EmbedBuilder() 30 | .setColor("Aqua") 31 | .setDescription("Pinging..."); 32 | 33 | const message = await response(interaction, { ephemeral: true, embeds: [embed1] }).catch(error); 34 | 35 | const embed2 = new EmbedBuilder() 36 | .setColor("Aqua") 37 | .setTitle("🏓 Pong") 38 | .setDescription(`💓: ${Math.round(client.ws.ping)} ms 39 | ⏱️: ${Date.now() - interaction.createdTimestamp} ms`); 40 | 41 | return await editResponse(interaction, message, { embeds: [embed2] }); 42 | } 43 | } 44 | /** 45 | * @copyright 46 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 47 | * @copyright 48 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 49 | * @copyright 50 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 51 | * @copyright 52 | */ -------------------------------------------------------------------------------- /src/commands/Music/back.js: -------------------------------------------------------------------------------- 1 | const { useHistory } = require("discord-player"); 2 | const { ApplicationCommandType } = require("discord.js"); 3 | module.exports = { 4 | name: "back", 5 | description: "Play the history track", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const history = useHistory(interaction.guildId); 25 | 26 | if (history.isEmpty()) 27 | return interaction.reply("The queue has no history track."); 28 | 29 | history.previous(); 30 | 31 | return interaction.reply("Backed the history track."); 32 | } 33 | }; 34 | /** 35 | * @copyright 36 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 37 | * @copyright 38 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 39 | * @copyright 40 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 41 | * @copyright 42 | */ -------------------------------------------------------------------------------- /src/commands/Music/clear.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "clearq", 5 | description: "Clear the tracks in the queue.", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | if (queue.size < 2) return interaction.reply("The queue has no more track."); 46 | 47 | queue.tracks.clear(); 48 | 49 | return interaction.reply("Cleared the queue tracks."); 50 | } 51 | }; 52 | /** 53 | * @copyright 54 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 55 | * @copyright 56 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 57 | * @copyright 58 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 59 | * @copyright 60 | */ -------------------------------------------------------------------------------- /src/commands/Music/filters.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-case-declarations */ 2 | const { useQueue } = require("discord-player"); 3 | const { ApplicationCommandOptionType, ApplicationCommandType, EmbedBuilder } = require("discord.js"); 4 | const avlFilters = [ 5 | "Bassboost", 6 | "Chorus", 7 | "Compressor", 8 | "Dim", 9 | "Earrape", 10 | "Expander", 11 | "Fadein", 12 | "Flanger", 13 | "Gate", 14 | "Haas", 15 | "Karaoke", 16 | "Lofi", 17 | "Mcompand", 18 | "Mono", 19 | "Nightcore", 20 | "Normalizer", 21 | "Phaser", 22 | "Pulsator", 23 | "Reverse", 24 | "Softlimiter", 25 | "Subboost", 26 | "Surrounding", 27 | "Treble", 28 | "Vaporwave", 29 | "Vibrato", 30 | ]; 31 | module.exports = { 32 | name: "filters", 33 | description: "Audio filters commands", 34 | category: "music", 35 | type: ApplicationCommandType.ChatInput, 36 | cooldown: 5, 37 | user_permissions: ["SendMessages"], 38 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 39 | dm_permissions: false, 40 | only_owner: false, 41 | only_slash: true, 42 | only_message: true, 43 | options: [ 44 | { 45 | type: ApplicationCommandOptionType.Subcommand, 46 | name: "clear", 47 | description: "Clear all applied filters." 48 | }, 49 | { 50 | type: ApplicationCommandOptionType.Subcommand, 51 | name: "show", 52 | description: "Show all filters." 53 | }, 54 | { 55 | type: ApplicationCommandOptionType.Subcommand, 56 | name: "toggle", 57 | description: "Toggle a audio filter.", 58 | options: [ 59 | { 60 | type: ApplicationCommandOptionType.String, 61 | name: "name", 62 | description: "The name of the filter", 63 | required: true, 64 | choices: avlFilters.map((f) => ({ 65 | name: `${f}`, 66 | value: `${f.toLowerCase()}` 67 | })) 68 | } 69 | ] 70 | } 71 | ], 72 | 73 | /** 74 | * 75 | * @param {import("discord.js").Client} client 76 | * @param {import("discord.js").CommandInteraction} interaction 77 | * @param {Array} args 78 | * @returns 79 | */ 80 | run: async (client, interaction, args) => { 81 | const queue = useQueue(interaction.guild.id); 82 | if (!queue) 83 | return interaction.reply({ 84 | content: "I’m currently not playing in this server.", 85 | ephemeral: true 86 | }); 87 | 88 | const memberChannelId = interaction.member?.voice?.channelId; 89 | const queueChannelId = queue?.channel.id; 90 | if (!memberChannelId) 91 | return interaction.reply({ 92 | content: "You need to join a voice channel first!", 93 | ephemeral: true 94 | }); 95 | 96 | if (memberChannelId !== queueChannelId) 97 | return interaction.reply({ 98 | content: "You must be in the same voice channel as me!", 99 | ephemeral: true 100 | }); 101 | 102 | const filters = queue.filters.ffmpeg.getFiltersEnabled(); 103 | switch (interaction.options.getSubcommand()) { 104 | case "clear": 105 | if (!filters.length) 106 | return interaction.reply("No audio filter is applied currently."); 107 | 108 | queue.filters.ffmpeg.setFilters(false); 109 | await interaction.reply("Cleared all audio filters."); 110 | break; 111 | 112 | case "toggle": 113 | const filterName = interaction.options.getString("name", true); 114 | queue.filters.ffmpeg.toggle(filterName); 115 | await interaction.reply(`Toggle the ${filterName} audio filter`); 116 | break; 117 | 118 | default: 119 | const enabledFilters = queue.filters.ffmpeg.getFiltersEnabled(); 120 | const disabledFilters = queue.filters.ffmpeg.getFiltersDisabled(); 121 | const enFDes = enabledFilters.map((f) => `${f} --> ✅`).join("\n"); 122 | const disFDes = disabledFilters.map((f) => `${f} --> ❌`).join("\n"); 123 | const embed = new EmbedBuilder() 124 | .setTitle("All Audio Filters") 125 | .setDescription(`${enFDes}\n\n${disFDes}`); 126 | 127 | await interaction.reply({ ephemeral: true, embeds: [embed] }); 128 | break; 129 | } 130 | } 131 | }; 132 | /** 133 | * @copyright 134 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 135 | * @copyright 136 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 137 | * @copyright 138 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 139 | * @copyright 140 | */ -------------------------------------------------------------------------------- /src/commands/Music/jump.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "jump", 5 | description: "Jump to specific track on the queue without removing other tracks", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "index", 18 | description: "The track index to jump to", 19 | type: ApplicationCommandOptionType.Number, 20 | required: true 21 | } 22 | ], 23 | 24 | /** 25 | * 26 | * @param {import("discord.js").Client} client 27 | * @param {import("discord.js").CommandInteraction} interaction 28 | * @param {Array} args 29 | * @returns 30 | */ 31 | run: async (client, interaction, args) => { 32 | const queue = useQueue(interaction.guild.id); 33 | if (!queue) 34 | return interaction.reply({ 35 | content: "I’m currently not playing in this server.", 36 | ephemeral: true 37 | }); 38 | 39 | const memberChannelId = interaction.member?.voice?.channelId; 40 | const queueChannelId = queue?.channel.id; 41 | if (!memberChannelId) 42 | return interaction.reply({ 43 | content: "You need to join a voice channel first!", 44 | ephemeral: true 45 | }); 46 | 47 | if (memberChannelId !== queueChannelId) 48 | return interaction.reply({ 49 | content: "You must be in the same voice channel as me!", 50 | ephemeral: true 51 | }); 52 | 53 | if (queue.isEmpty()) return interaction.reply("The queue has no more track."); 54 | 55 | const index = interaction.options.getNumber("index", true) - 1; 56 | 57 | if (index > queue.size || index < 0) 58 | return interaction.reply("Provided track index does not exist."); 59 | 60 | queue.node.jump(index); 61 | 62 | return interaction.reply(`Jumped to track ${index + 1}.`); 63 | } 64 | }; 65 | /** 66 | * @copyright 67 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 68 | * @copyright 69 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 70 | * @copyright 71 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 72 | * @copyright 73 | */ -------------------------------------------------------------------------------- /src/commands/Music/lyrics.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType, EmbedBuilder } = require("discord.js"); 2 | const { useQueue, useMainPlayer } = require("discord-player"); 3 | const error = require("../../functions/error"); 4 | const response = require("../../functions/response"); 5 | module.exports = { 6 | name: "lyrics", 7 | description: "Get lyrics for a track.", 8 | category: "music", 9 | type: ApplicationCommandType.ChatInput, 10 | cooldown: 5, 11 | user_permissions: ["SendMessages"], 12 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 13 | dm_permissions: false, 14 | only_owner: false, 15 | only_slash: true, 16 | only_message: true, 17 | options: [ 18 | { 19 | type: ApplicationCommandOptionType.String, 20 | name: "query", 21 | description: "The track title to search lyrics", 22 | required: false 23 | } 24 | ], 25 | 26 | /** 27 | * 28 | * @param {import("discord.js").Client} client 29 | * @param {import("discord.js").CommandInteraction} interaction 30 | * @param {Array} args 31 | * @returns 32 | */ 33 | run: async (client, interaction, args) => { 34 | const player = useMainPlayer(); 35 | const queue = useQueue(interaction.guild.id); 36 | let query = interaction.user ? interaction.options.getString("query") : args.join(" "); 37 | if (!query) { 38 | if (!queue) 39 | return await response(interaction, { 40 | content: "I’m currently not playing in this server.", 41 | ephemeral: true 42 | }); 43 | 44 | const memberChannelId = interaction.member?.voice?.channelId; 45 | const queueChannelId = queue?.channel.id; 46 | if (!memberChannelId) 47 | return await response(interaction, { 48 | content: "You need to join a voice channel first!", 49 | ephemeral: true 50 | }); 51 | 52 | if (memberChannelId !== queueChannelId) 53 | return await response(interaction, { 54 | content: "You must be in the same voice channel as me!", 55 | ephemeral: true 56 | }); 57 | 58 | query = queue?.currentTrack?.title; 59 | } 60 | 61 | if (!query) 62 | return await response(interaction, "You forgot to provide the track name."); 63 | 64 | const queryFormated = query 65 | .toLowerCase() 66 | .replace( 67 | /\(lyrics|lyric|official music video|official video hd|official video|audio|official|clip officiel|clip|extended|hq\)/g, 68 | "" 69 | ); 70 | 71 | const result = (await player.lyrics.search({ q: queryFormated }).catch(() => null))[0]; 72 | if (!result || !result.syncedLyrics) 73 | return await response(interaction, "No lyrics were found for this track."); 74 | 75 | const lyrics = 76 | result.plainLyrics.length > 4096 ? `${result.plainLyrics.slice(0, 4090)} ...` : result.plainLyrics; 77 | 78 | const embed = new EmbedBuilder() 79 | .setTitle(result.trackName) 80 | .setAuthor({ 81 | name: result.artistName 82 | }) 83 | .setDescription(lyrics); 84 | 85 | return await response(interaction, { embeds: [embed] }).catch(error); 86 | } 87 | }; 88 | /** 89 | * @copyright 90 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 91 | * @copyright 92 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 93 | * @copyright 94 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 95 | * @copyright 96 | */ -------------------------------------------------------------------------------- /src/commands/Music/move.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "move", 5 | description: "Move a track in the queue", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "from", 18 | description: "The track to move.", 19 | type: ApplicationCommandOptionType.Number, 20 | required: true 21 | }, 22 | { 23 | name: "to", 24 | description: "The position to move to.", 25 | type: ApplicationCommandOptionType.Number, 26 | required: true 27 | } 28 | ], 29 | 30 | /** 31 | * 32 | * @param {import("discord.js").Client} client 33 | * @param {import("discord.js").CommandInteraction} interaction 34 | * @param {Array} args 35 | * @returns 36 | */ 37 | run: async (client, interaction, args) => { 38 | const queue = useQueue(interaction.guild.id); 39 | if (!queue) 40 | return interaction.reply({ 41 | content: "I’m currently not playing in this server.", 42 | ephemeral: true 43 | }); 44 | 45 | const memberChannelId = interaction.member?.voice?.channelId; 46 | const queueChannelId = queue?.channel.id; 47 | if (!memberChannelId) 48 | return interaction.reply({ 49 | content: "You need to join a voice channel first!", 50 | ephemeral: true 51 | }); 52 | 53 | if (memberChannelId !== queueChannelId) 54 | return interaction.reply({ 55 | content: "You must be in the same voice channel as me!", 56 | ephemeral: true 57 | }); 58 | 59 | if (queue.size < 3) 60 | return interaction.reply("Need at least 3 songs in the queue to use this command."); 61 | 62 | const from = interaction.options.getNumber("from", true); 63 | const to = interaction.options.getNumber("to", true); 64 | 65 | if (from < 1 || from >= queue.size) 66 | return interaction.reply("Provided `from` index is not valid."); 67 | 68 | if (to < 1 || to >= queue.size) 69 | return interaction.reply("Provided `to` position is not valid."); 70 | 71 | if (from === to) 72 | return interaction.reply("The track is already in this position."); 73 | 74 | queue.node.move(from, to); 75 | 76 | return interaction.reply(`The track is moved to the position ${to}.`); 77 | } 78 | }; 79 | /** 80 | * @copyright 81 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 82 | * @copyright 83 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 84 | * @copyright 85 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 86 | * @copyright 87 | */ -------------------------------------------------------------------------------- /src/commands/Music/nowplaying.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandType, EmbedBuilder } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | const error = require("../../functions/error"); 4 | module.exports = { 5 | name: "nowplaying", 6 | description: "Show the currently playing track.", 7 | category: "music", 8 | type: ApplicationCommandType.ChatInput, 9 | cooldown: 5, 10 | user_permissions: ["SendMessages"], 11 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 12 | dm_permissions: false, 13 | only_owner: false, 14 | only_slash: true, 15 | only_message: true, 16 | 17 | /** 18 | * 19 | * @param {import("discord.js").Client} client 20 | * @param {import("discord.js").CommandInteraction} interaction 21 | * @param {Array} args 22 | * @returns 23 | */ 24 | run: async (client, interaction, args) => { 25 | const queue = useQueue(interaction.guild.id); 26 | if (!queue) 27 | return interaction.reply({ 28 | content: "I’m currently not playing in this server.", 29 | ephemeral: true 30 | }); 31 | 32 | const memberChannelId = interaction.member?.voice?.channelId; 33 | const queueChannelId = queue?.channel.id; 34 | if (!memberChannelId) 35 | return interaction.reply({ 36 | content: "You need to join a voice channel first!", 37 | ephemeral: true 38 | }); 39 | 40 | if (memberChannelId !== queueChannelId) 41 | return interaction.reply({ 42 | content: "You must be in the same voice channel as me!", 43 | ephemeral: true 44 | }); 45 | 46 | const track = queue.currentTrack; 47 | 48 | const embed = new EmbedBuilder() 49 | .setAuthor({ name: "Now playing" }) 50 | .setTitle(`${track.title}`) 51 | .setURL(`${track.url}`) 52 | .setThumbnail(`${track.thumbnail}`) 53 | .setImage('https://message.style/cdn/images/e86348384e1e3d4bb9018573a6573c8eea1fd665a88128725d051a51ee358904.png') 54 | .setDescription(`Played by: ${track.requestedBy.toString()}\n 55 | ${queue.node.createProgressBar()}`); 56 | 57 | return interaction.reply({ ephemeral: true, embeds: [embed] }).catch(error); 58 | } 59 | }; 60 | /** 61 | * @copyright 62 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 63 | * @copyright 64 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 65 | * @copyright 66 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 67 | * @copyright 68 | */ -------------------------------------------------------------------------------- /src/commands/Music/pause.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "pause", 5 | description: "Pause the playback", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | if (queue.node.isPaused()) 46 | return interaction.reply("The playback is already paused."); 47 | 48 | queue.node.pause(); 49 | 50 | return interaction.reply("Paused the playback."); 51 | }, 52 | }; 53 | /** 54 | * @copyright 55 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 56 | * @copyright 57 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 58 | * @copyright 59 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 60 | * @copyright 61 | */ -------------------------------------------------------------------------------- /src/commands/Music/play.js: -------------------------------------------------------------------------------- 1 | const { 2 | ApplicationCommandType, 3 | ApplicationCommandOptionType 4 | } = require("discord.js"); 5 | const { 6 | useQueue, 7 | useMainPlayer 8 | } = require("discord-player"); 9 | const error = require("../../functions/error"); 10 | const response = require("../../functions/response"); 11 | module.exports = { 12 | name: "play", 13 | description: "پخش موزیک در ویس چنل.", 14 | category: "music", 15 | type: ApplicationCommandType.ChatInput, 16 | cooldown: 5, 17 | aliases: ["p"], 18 | user_permissions: ["SendMessages"], 19 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 20 | dm_permissions: false, 21 | only_owner: false, 22 | only_slash: true, 23 | only_message: true, 24 | options: [{ 25 | name: "track", 26 | description: "لطفا نام خواننده یا آهنگ و یا لینک وارد کنید.", 27 | type: ApplicationCommandOptionType.String, 28 | required: true 29 | }], 30 | 31 | /** 32 | * 33 | * @param {import("discord.js").Client} client 34 | * @param {import("discord.js").CommandInteraction} interaction 35 | * @param {Array} args 36 | * @returns 37 | */ 38 | run: async (client, interaction, args) => { 39 | try { 40 | let query = interaction.user ? interaction.options.getString("track") : args.join(" "); 41 | const member = interaction.guild.members.cache.get(interaction.member.id); 42 | const player = useMainPlayer(); 43 | const queue = useQueue(interaction.guild.id); 44 | const channel = member?.voice?.channel; 45 | if (!query) return await response(interaction, { content: "You have to write a music name or place a url." }); 46 | 47 | if (!channel) return await response(interaction, { content: "You have to join a voice channel first." }); 48 | 49 | if (queue && queue.channel.id !== channel.id) 50 | return await response(interaction, { content: "I'm already playing in a different voice channel!" }); 51 | 52 | if (!channel.viewable) 53 | return await response(interaction, { content: "I need `View Channel` permission." }); 54 | 55 | if (!channel.joinable) 56 | return await response(interaction, { content: "I need `Connect Channel` permission." }); 57 | 58 | if (channel.full) 59 | return await response(interaction, { content: "Can't join, the voice channel is full." }); 60 | 61 | if (member.voice.deaf) 62 | return await response(interaction, { content: "You cannot run this command while deafened." }); 63 | 64 | if (interaction.guild.members.me?.voice?.mute) 65 | return await response(interaction, { content: "Please unmute me before playing." }); 66 | 67 | if (query.startsWith("https://on.soundcloud.com")) { 68 | const results = await fetch(query.split(" ")[0]); 69 | query = results.url; 70 | }; 71 | 72 | const searchResult = await player 73 | .search(query, { requestedBy: member }) 74 | .catch(error); 75 | 76 | if (!searchResult.hasTracks()) 77 | return await response(interaction, { content: `No track was found for ${query}!` }); 78 | 79 | const { track } = await player.play(channel, searchResult, { 80 | nodeOptions: { 81 | metadata: { 82 | channel: interaction.channel, 83 | author: member 84 | } 85 | } 86 | }); 87 | 88 | return await response(interaction, { content: `This object founded **${track.title}** from **${track.author}**!` }); 89 | } catch (e) { 90 | error(e); 91 | } 92 | } 93 | } 94 | /** 95 | * @copyright 96 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 97 | * @copyright 98 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 99 | * @copyright 100 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 101 | * @copyright 102 | */ -------------------------------------------------------------------------------- /src/commands/Music/remove.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "remove", 5 | description: "Remove a track from queue", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "index", 18 | description: "The track index to remove", 19 | type: ApplicationCommandOptionType.Number, 20 | required: true 21 | } 22 | ], 23 | 24 | /** 25 | * 26 | * @param {import("discord.js").Client} client 27 | * @param {import("discord.js").CommandInteraction} interaction 28 | * @param {Array} args 29 | * @returns 30 | */ 31 | run: async (client, interaction, args) => { 32 | const queue = useQueue(interaction.guild.id); 33 | if (!queue) 34 | return interaction.reply({ 35 | content: "I’m currently not playing in this server.", 36 | ephemeral: true 37 | }); 38 | 39 | const memberChannelId = interaction.member?.voice?.channelId; 40 | const queueChannelId = queue?.channel.id; 41 | if (!memberChannelId) 42 | return interaction.reply({ 43 | content: "You need to join a voice channel first!", 44 | ephemeral: true 45 | }); 46 | 47 | if (memberChannelId !== queueChannelId) 48 | return interaction.reply({ 49 | content: "You must be in the same voice channel as me!", 50 | ephemeral: true 51 | }); 52 | 53 | if (queue.size < 1) return interaction.reply("The queue has no more track."); 54 | 55 | const index = interaction.options.getNumber("index", true) - 1; 56 | 57 | if (index > queue.size || index < 0) 58 | return interaction.reply("Provided track index does not exist."); 59 | 60 | queue.node.remove(index); 61 | 62 | return interaction.reply(`Removed track ${index + 1}.`); 63 | }, 64 | }; 65 | /** 66 | * @copyright 67 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 68 | * @copyright 69 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 70 | * @copyright 71 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 72 | * @copyright 73 | */ -------------------------------------------------------------------------------- /src/commands/Music/repeat.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-case-declarations */ 2 | const { ApplicationCommandOptionType, ApplicationCommandType, EmbedBuilder } = require("discord.js"); 3 | const { QueueRepeatMode, useQueue } = require("discord-player"); 4 | const error = require("../../functions/error"); 5 | module.exports = { 6 | name: "repeat", 7 | description: "Set repeat mode for the queue", 8 | category: "music", 9 | type: ApplicationCommandType.ChatInput, 10 | cooldown: 5, 11 | user_permissions: ["SendMessages"], 12 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 13 | dm_permissions: false, 14 | only_owner: false, 15 | only_slash: true, 16 | only_message: true, 17 | options: [ 18 | { 19 | type: ApplicationCommandOptionType.Subcommand, 20 | name: "show", 21 | description: "Show current repeat mode status." 22 | }, 23 | { 24 | type: ApplicationCommandOptionType.Subcommand, 25 | name: "off", 26 | description: "Default mode with no loop active" 27 | }, 28 | { 29 | type: ApplicationCommandOptionType.Subcommand, 30 | name: "queue", 31 | description: "Loop the current queue" 32 | }, 33 | { 34 | type: ApplicationCommandOptionType.Subcommand, 35 | name: "track", 36 | description: "Repeat the current track" 37 | }, 38 | { 39 | type: ApplicationCommandOptionType.Subcommand, 40 | name: "autoplay", 41 | description: "Play related songs automatically based on your existing queue" 42 | } 43 | ], 44 | 45 | /** 46 | * 47 | * @param {import("discord.js").Client} client 48 | * @param {import("discord.js").CommandInteraction} interaction 49 | * @param {Array} args 50 | * @returns 51 | */ 52 | run: async (client, interaction, args) => { 53 | const queue = useQueue(interaction.guild.id); 54 | if (!queue) 55 | return interaction.reply({ 56 | content: "I’m currently not playing in this server.", 57 | ephemeral: true 58 | }); 59 | 60 | const memberChannelId = interaction.member?.voice?.channelId; 61 | const queueChannelId = queue?.channel.id; 62 | if (!memberChannelId) 63 | return interaction.reply({ 64 | content: "You need to join a voice channel first!", 65 | ephemeral: true 66 | }); 67 | 68 | if (memberChannelId !== queueChannelId) 69 | return interaction.reply({ 70 | content: "You must be in the same voice channel as me!", 71 | ephemeral: true 72 | }); 73 | 74 | let description; 75 | switch (interaction.options.getSubcommand()) { 76 | case "off": 77 | queue.setRepeatMode(QueueRepeatMode.OFF); 78 | description = "Turned off repeat mode."; 79 | break; 80 | case "track": 81 | queue.setRepeatMode(QueueRepeatMode.TRACK); 82 | description = "Looping the current track."; 83 | break; 84 | case "queue": 85 | queue.setRepeatMode(QueueRepeatMode.QUEUE); 86 | description = "Looing the current queue."; 87 | break; 88 | case "autoplay": 89 | queue.setRepeatMode(QueueRepeatMode.AUTOPLAY); 90 | description = "Autoplay mode activated."; 91 | break; 92 | // case "show": 93 | default: 94 | let status = "none"; 95 | if (queue.repeatMode === 3) { 96 | status = "autoplay"; 97 | } else if (queue.repeatMode === 2) { 98 | status = "queue"; 99 | } else if (queue.repeatMode === 1) { 100 | status = "track"; 101 | } else if (queue.repeatMode === 0) { 102 | status = "off"; 103 | } 104 | 105 | const embed = new EmbedBuilder() 106 | .setDescription(`Playback repeat status: \`${status}\`.`) 107 | .setFooter({ text: `Use '/repeat ' to change repeat mode.` }); 108 | 109 | return interaction.reply({ ephemeral: true, embeds: [embed] }).catch(error); 110 | } 111 | 112 | return interaction.reply({ 113 | embeds: [new EmbedBuilder().setDescription(description)], 114 | }); 115 | } 116 | }; 117 | /** 118 | * @copyright 119 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 120 | * @copyright 121 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 122 | * @copyright 123 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 124 | * @copyright 125 | */ -------------------------------------------------------------------------------- /src/commands/Music/replay.js: -------------------------------------------------------------------------------- 1 | const { useQueue } = require("discord-player"); 2 | const { ApplicationCommandType } = require("discord.js"); 3 | module.exports = { 4 | name: "replay", 5 | description: "Replay the current track.", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | queue.node.seek(0); 46 | 47 | return interaction.reply("Replayed the current track."); 48 | } 49 | }; 50 | /** 51 | * @copyright 52 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 53 | * @copyright 54 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 55 | * @copyright 56 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 57 | * @copyright 58 | */ -------------------------------------------------------------------------------- /src/commands/Music/resume.js: -------------------------------------------------------------------------------- 1 | const { useQueue } = require("discord-player"); 2 | const { ApplicationCommandType } = require("discord.js"); 3 | module.exports = { 4 | name: "resume", 5 | description: "Resume the playback", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | if (queue.node.isPlaying()) 46 | return interaction.reply("The playback is already playing."); 47 | 48 | queue.node.resume(); 49 | 50 | return interaction.reply("Resumed the playback."); 51 | } 52 | }; 53 | /** 54 | * @copyright 55 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 56 | * @copyright 57 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 58 | * @copyright 59 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 60 | * @copyright 61 | */ -------------------------------------------------------------------------------- /src/commands/Music/seek.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "seek", 5 | description: "Seek the player", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "duration", 18 | description: "The duration to seek to ", 19 | type: ApplicationCommandOptionType.String, 20 | required: true, 21 | }, 22 | ], 23 | 24 | /** 25 | * 26 | * @param {import("discord.js").Client} client 27 | * @param {import("discord.js").CommandInteraction} interaction 28 | * @param {Array} args 29 | * @returns 30 | */ 31 | run: async (client, interaction, args) => { 32 | const queue = useQueue(interaction.guild.id); 33 | if (!queue) 34 | return interaction.reply({ 35 | content: "I’m currently not playing in this server.", 36 | ephemeral: true 37 | }); 38 | 39 | const memberChannelId = interaction.member?.voice?.channelId; 40 | const queueChannelId = queue?.channel.id; 41 | if (!memberChannelId) 42 | return interaction.reply({ 43 | content: "You need to join a voice channel first!", 44 | ephemeral: true 45 | }); 46 | 47 | if (memberChannelId !== queueChannelId) 48 | return interaction.reply({ 49 | content: "You must be in the same voice channel as me!", 50 | ephemeral: true 51 | }); 52 | 53 | let timeString = interaction.options.getString("duration"); 54 | 55 | if (isNaN(timeString) && !timeString.includes(":")) 56 | return interaction.reply("Provide a valid duration to seek."); 57 | 58 | if (!isNaN(timeString)) timeString = `00:${timeString}`; 59 | 60 | /** 61 | * convert formatted duration to milliseconds 62 | * @param {string} formatted duration input 63 | * @returns {number} 64 | */ 65 | function toMilliseconds(input) { 66 | if (!input) return 0; 67 | if (typeof input !== "string") return Number(input) || 0; 68 | if (input.match(/:/g)) { 69 | const time = input.split(":").reverse(); 70 | let s = 0; 71 | for (let i = 0; i < 3; i++) 72 | if (time[i]) s += Number(time[i].replace(/[^\d.]+/g, "")) * Math.pow(60, i); 73 | if (time.length > 3) s += Number(time[3].replace(/[^\d.]+/g, "")) * 24 * 60 * 60; 74 | return Number(s * 1000); 75 | } 76 | return Number(input.replace(/[^\d.]+/g, "") * 1000) || 0; 77 | } 78 | const time = toMilliseconds(timeString); 79 | 80 | if (!time || isNaN(time) || time > queue.currentTrack.durationMS || time < 0) 81 | return interaction.reply("Provide a valid duration to seek."); 82 | 83 | queue.node.seek(time); 84 | 85 | return interaction.reply(`Seeked to \`${timeString}\`.`); 86 | } 87 | }; 88 | /** 89 | * @copyright 90 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 91 | * @copyright 92 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 93 | * @copyright 94 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 95 | * @copyright 96 | */ -------------------------------------------------------------------------------- /src/commands/Music/shuffle.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "shuffle", 5 | description: "Shuffle the queue.", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | if (queue.size < 3) 46 | return interaction.reply("Need at least 3 tracks in the queue to shuffle."); 47 | 48 | queue.tracks.shuffle(); 49 | 50 | return interaction.reply("Shuffled the queue."); 51 | } 52 | }; 53 | /** 54 | * @copyright 55 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 56 | * @copyright 57 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 58 | * @copyright 59 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 60 | * @copyright 61 | */ -------------------------------------------------------------------------------- /src/commands/Music/skip.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "skip", 5 | description: "Skip current track", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | if (queue.size < 1 && queue.repeatMode !== 3) 46 | return interaction.reply("The queue has no more track."); 47 | 48 | queue.node.skip(); 49 | 50 | return interaction.reply("Skipped the current track."); 51 | } 52 | }; 53 | /** 54 | * @copyright 55 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 56 | * @copyright 57 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 58 | * @copyright 59 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 60 | * @copyright 61 | */ -------------------------------------------------------------------------------- /src/commands/Music/skipto.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "skipto", 5 | description: "Skip to the given track, removing others on the way", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "index", 18 | description: "The track index to skip to", 19 | type: ApplicationCommandOptionType.Number, 20 | required: true 21 | } 22 | ], 23 | 24 | /** 25 | * 26 | * @param {import("discord.js").Client} client 27 | * @param {import("discord.js").CommandInteraction} interaction 28 | * @param {Array} args 29 | * @returns 30 | */ 31 | run: async (client, interaction, args) => { 32 | const queue = useQueue(interaction.guild.id); 33 | if (!queue) 34 | return interaction.reply({ 35 | content: "I’m currently not playing in this server.", 36 | ephemeral: true 37 | }); 38 | 39 | const memberChannelId = interaction.member?.voice?.channelId; 40 | const queueChannelId = queue?.channel.id; 41 | if (!memberChannelId) 42 | return interaction.reply({ 43 | content: "You need to join a voice channel first!", 44 | ephemeral: true 45 | }); 46 | 47 | if (memberChannelId !== queueChannelId) 48 | return interaction.reply({ 49 | content: "You must be in the same voice channel as me!", 50 | ephemeral: true 51 | }); 52 | 53 | if (queue.size < 1) return interaction.reply("The queue has no more track."); 54 | 55 | const index = interaction.options.getNumber("index", true) - 1; 56 | 57 | if (index > queue.size || index < 0) 58 | return interaction.reply("Provided track index does not exist."); 59 | 60 | queue.node.skipTo(index); 61 | 62 | return interaction.reply(`Skipped to track ${index + 1}.`); 63 | } 64 | }; 65 | /** 66 | * @copyright 67 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 68 | * @copyright 69 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 70 | * @copyright 71 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 72 | * @copyright 73 | */ -------------------------------------------------------------------------------- /src/commands/Music/stop.js: -------------------------------------------------------------------------------- 1 | const { useQueue } = require("discord-player"); 2 | const { ApplicationCommandType } = require("discord.js"); 3 | module.exports = { 4 | name: "stop", 5 | description: "Stop the playback.", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | 16 | /** 17 | * 18 | * @param {import("discord.js").Client} client 19 | * @param {import("discord.js").CommandInteraction} interaction 20 | * @param {Array} args 21 | * @returns 22 | */ 23 | run: async (client, interaction, args) => { 24 | const queue = useQueue(interaction.guild.id); 25 | if (!queue) 26 | return interaction.reply({ 27 | content: "I’m currently not playing in this server.", 28 | ephemeral: true 29 | }); 30 | 31 | const memberChannelId = interaction.member?.voice?.channelId; 32 | const queueChannelId = queue?.channel.id; 33 | if (!memberChannelId) 34 | return interaction.reply({ 35 | content: "You need to join a voice channel first!", 36 | ephemeral: true 37 | }); 38 | 39 | if (memberChannelId !== queueChannelId) 40 | return interaction.reply({ 41 | content: "You must be in the same voice channel as me!", 42 | ephemeral: true 43 | }); 44 | 45 | queue.delete(); 46 | return interaction.reply("Stopped the playback."); 47 | } 48 | }; 49 | /** 50 | * @copyright 51 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 52 | * @copyright 53 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 54 | * @copyright 55 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 56 | * @copyright 57 | */ -------------------------------------------------------------------------------- /src/commands/Music/swap.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "swap", 5 | description: "Swap two tracks in the queue", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "first", 18 | description: "The first track to swap", 19 | type: ApplicationCommandOptionType.Number, 20 | required: true 21 | }, 22 | { 23 | name: "second", 24 | description: "The second track to swap", 25 | type: ApplicationCommandOptionType.Number, 26 | required: true 27 | } 28 | ], 29 | 30 | /** 31 | * 32 | * @param {import("discord.js").Client} client 33 | * @param {import("discord.js").CommandInteraction} interaction 34 | * @param {Array} args 35 | * @returns 36 | */ 37 | run: async (client, interaction, args) => { 38 | const queue = useQueue(interaction.guild.id); 39 | if (!queue) 40 | return interaction.reply({ 41 | content: "I’m currently not playing in this server.", 42 | ephemeral: true 43 | }); 44 | 45 | const memberChannelId = interaction.member?.voice?.channelId; 46 | const queueChannelId = queue?.channel.id; 47 | if (!memberChannelId) 48 | return interaction.reply({ 49 | content: "You need to join a voice channel first!", 50 | ephemeral: true 51 | }); 52 | 53 | if (memberChannelId !== queueChannelId) 54 | return interaction.reply({ 55 | content: "You must be in the same voice channel as me!", 56 | ephemeral: true 57 | }); 58 | 59 | if (queue.size < 3) 60 | return interaction.reply("Need at least 3 songs in the queue to use this command."); 61 | 62 | const first = interaction.options.getNumber("first", true); 63 | const second = interaction.options.getNumber("second", true); 64 | 65 | if (first < 1 || first >= queue.size) 66 | return interaction.reply("Provided `first` track index is not valid."); 67 | 68 | if (second < 1 || second >= queue.size) 69 | return interaction.reply("Provided `second` track index is not valid."); 70 | 71 | if (first === second) 72 | return interaction.reply("The tracks are already in this position."); 73 | 74 | queue.node.swap(first, second); 75 | 76 | return interaction.reply(`Track ${first} & ${second} has been swapped.`); 77 | } 78 | }; 79 | /** 80 | * @copyright 81 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 82 | * @copyright 83 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 84 | * @copyright 85 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 86 | * @copyright 87 | */ -------------------------------------------------------------------------------- /src/commands/Music/trackinfo.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType, EmbedBuilder } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | const error = require("../../functions/error"); 4 | module.exports = { 5 | name: "trackinfo", 6 | description: "Show details of a track.", 7 | category: "music", 8 | type: ApplicationCommandType.ChatInput, 9 | cooldown: 5, 10 | user_permissions: ["SendMessages"], 11 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 12 | dm_permissions: false, 13 | only_owner: false, 14 | only_slash: true, 15 | only_message: true, 16 | options: [ 17 | { 18 | name: "index", 19 | type: ApplicationCommandOptionType.Number, 20 | description: "That track index.", 21 | required: true 22 | } 23 | ], 24 | 25 | /** 26 | * 27 | * @param {import("discord.js").Client} client 28 | * @param {import("discord.js").CommandInteraction} interaction 29 | * @param {Array} args 30 | * @returns 31 | */ 32 | run: async (client, interaction, args) => { 33 | const queue = useQueue(interaction.guild.id); 34 | if (!queue) 35 | return interaction.reply({ 36 | content: "I’m currently not playing in this server.", 37 | ephemeral: true 38 | }); 39 | 40 | const memberChannelId = interaction.member?.voice?.channelId; 41 | const queueChannelId = queue?.channel.id; 42 | if (!memberChannelId) 43 | return interaction.reply({ 44 | content: "You need to join a voice channel first!", 45 | ephemeral: true 46 | }); 47 | 48 | if (memberChannelId !== queueChannelId) 49 | return interaction.reply({ 50 | content: "You must be in the same voice channel as me!", 51 | ephemeral: true 52 | }); 53 | 54 | const index = interaction.options.getNumber("index", true) - 1; 55 | 56 | if (index > queue.size || index < 0) 57 | return interaction.reply("Provided track Index does not exist."); 58 | 59 | const track = queue.tracks.toArray()[index]; 60 | 61 | if (!track) return interaction.reply("The track was not found."); 62 | 63 | const embed = new EmbedBuilder() 64 | .setAuthor({ name: "Trackinfo 🎵" }) 65 | .setTitle(`${track.title}`) 66 | .setURL(`${track.url}`) 67 | .setThumbnail(`${track.thumbnail}`) 68 | .setDescription(`~ Requested by: ${track.requestedBy.toString()} 69 | Duration: ${track.duration} 70 | Position in queue: ${index + 1}`); 71 | 72 | return interaction.reply({ ephemeral: true, embeds: [embed] }).catch(error); 73 | }, 74 | }; 75 | /** 76 | * @copyright 77 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 78 | * @copyright 79 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 80 | * @copyright 81 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 82 | * @copyright 83 | */ -------------------------------------------------------------------------------- /src/commands/Music/volume.js: -------------------------------------------------------------------------------- 1 | const { ApplicationCommandOptionType, ApplicationCommandType, EmbedBuilder } = require("discord.js"); 2 | const { useQueue } = require("discord-player"); 3 | module.exports = { 4 | name: "volume", 5 | description: "Check or change the volume", 6 | category: "music", 7 | type: ApplicationCommandType.ChatInput, 8 | cooldown: 5, 9 | user_permissions: ["SendMessages"], 10 | bot_permissions: ["SendMessages", "EmbedLinks", "Connect", "Speak"], 11 | dm_permissions: false, 12 | only_owner: false, 13 | only_slash: true, 14 | only_message: true, 15 | options: [ 16 | { 17 | name: "amount", 18 | description: "Volume amount to set", 19 | type: ApplicationCommandOptionType.Number, 20 | required: false, 21 | minValue: 1, 22 | maxValue: 200 23 | } 24 | ], 25 | 26 | /** 27 | * 28 | * @param {import("discord.js").Client} client 29 | * @param {import("discord.js").CommandInteraction} interaction 30 | * @param {Array} args 31 | * @returns 32 | */ 33 | run: async (client, interaction, args) => { 34 | const queue = useQueue(interaction.guild.id); 35 | if (!queue) 36 | return interaction.reply({ 37 | content: "I’m currently not playing in this server.", 38 | ephemeral: true 39 | }); 40 | 41 | const memberChannelId = interaction.member?.voice?.channelId; 42 | const queueChannelId = queue?.channel.id; 43 | if (!memberChannelId) 44 | return interaction.reply({ 45 | content: "You need to join a voice channel first!", 46 | ephemeral: true 47 | }); 48 | 49 | if (memberChannelId !== queueChannelId) 50 | return interaction.reply({ 51 | content: "You must be in the same voice channel as me!", 52 | ephemeral: true 53 | }); 54 | 55 | const newVol = interaction.options.getNumber("amount", false); 56 | 57 | if (!newVol) { 58 | const embed = new EmbedBuilder() 59 | .setDescription(`Current volume is \`${queue.node.volume}%\`.`) 60 | .setFooter({ text: "Use '/volume <1-100>' to change the volume." }); 61 | 62 | return interaction.reply({ ephemeral: true, embeds: [embed] }).catch(error); 63 | } 64 | 65 | queue.node.setVolume(newVol); 66 | 67 | return interaction.reply(`Volume is updated to ${newVol}.`); 68 | } 69 | }; 70 | /** 71 | * @copyright 72 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 73 | * @copyright 74 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 75 | * @copyright 76 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 77 | * @copyright 78 | */ -------------------------------------------------------------------------------- /src/commands/Nsfw/gif.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | const copyRight = require("../../storage/copyRight.json"); 4 | const getDataFromNeko = require("../../functions/getDataFromNeko"); 5 | module.exports = { 6 | name: "gif", 7 | description: "دریافت و ارسال گیف های حق از api و نشان دادن آن به صورت رندوم.", 8 | category: "nsfw", 9 | cooldown: 5, 10 | user_permissions: ["SendMessages"], 11 | bot_permissions: ["SendMessages", "EmbedLinks"], 12 | dm_permissions: false, 13 | only_owner: false, 14 | only_slash: false, 15 | only_message: true, 16 | 17 | /** 18 | * 19 | * @param {import("discord.js").Client} client 20 | * @param {import("discord.js").CommandInteraction} interaction 21 | * @param {Array} args 22 | * @returns 23 | */ 24 | run: async (client, interaction, args) => { 25 | try { 26 | if (!interaction.channel.nsfw) return interaction.reply({ content: `پسر خوب اینجا که برای بچه سالاست پاشو برو چنل هایی که NSFW اش روشن باهشه موش کور.` }); 27 | 28 | const data = await getDataFromNeko("pgif"); 29 | try { 30 | if (data.message) { 31 | return await interaction.reply({ 32 | embeds: [new EmbedBuilder().setColor("#2B2D31").setTitle(`گیف های حق و آغشته به پورن به صورت شانسی`).setDescription(`مراقب چشات باش`).setTimestamp().setImage(data.message).setFooter({ text: copyRight.footerText, iconURL: copyRight.footerIcon })] 33 | }) 34 | }; 35 | } catch (e) { 36 | error(e) 37 | } 38 | 39 | } catch (e) { 40 | error(e); 41 | } 42 | } 43 | } 44 | /** 45 | * @copyright 46 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 47 | * @copyright 48 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 49 | * @copyright 50 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 51 | * @copyright 52 | */ -------------------------------------------------------------------------------- /src/commands/Nsfw/image.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | const copyRight = require("../../storage/copyRight.json"); 4 | const types = require("../../storage/nsfw/nekoApiTypes.json"); 5 | const getDataFromNeko = require("../../functions/getDataFromNeko"); 6 | module.exports = { 7 | name: "image", 8 | description: "دریافت تصاویر حق از api و نشان دادن آن به صورت رندوم.", 9 | category: "nsfw", 10 | cooldown: 5, 11 | user_permissions: ["SendMessages"], 12 | bot_permissions: ["SendMessages", "EmbedLinks"], 13 | dm_permissions: false, 14 | only_owner: false, 15 | only_slash: false, 16 | only_message: true, 17 | 18 | /** 19 | * 20 | * @param {import("discord.js").Client} client 21 | * @param {import("discord.js").CommandInteraction} interaction 22 | * @param {Array} args 23 | * @returns 24 | */ 25 | run: async (client, interaction, args) => { 26 | try { 27 | if (!interaction.channel.nsfw) return interaction.reply({ content: `پسر خوب اینجا که برای بچه سالاست پاشو برو چنل هایی که NSFW اش روشن باهشه موش کور.` }); 28 | 29 | const type = types[Math.floor(Math.random() * types.length)]; 30 | const data = await getDataFromNeko(type); 31 | try { 32 | if (data.message) { 33 | return await interaction.reply({ 34 | embeds: [new EmbedBuilder().setColor("#2B2D31").setTitle(`تصاویر حق و آغشته به پورن به صورت شانسی`).setDescription(`مراقب چشات باش`).setTimestamp().setImage(data.message).setFooter({ text: copyRight.footerText, iconURL: copyRight.footerIcon })] 35 | }) 36 | }; 37 | } catch (e) { 38 | error(e) 39 | } 40 | 41 | } catch (e) { 42 | error(e); 43 | } 44 | } 45 | } 46 | /** 47 | * @copyright 48 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 49 | * @copyright 50 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 51 | * @copyright 52 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 53 | * @copyright 54 | */ -------------------------------------------------------------------------------- /src/commands/Nsfw/video.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | const copyRight = require("../../storage/copyRight.json"); 4 | const fs = require("fs"); 5 | module.exports = { 6 | name: "video", 7 | description: "دریافت و ارسال ویدیو های حق.", 8 | category: "nsfw", 9 | cooldown: 5, 10 | user_permissions: ["SendMessages"], 11 | bot_permissions: ["SendMessages", "EmbedLinks"], 12 | dm_permissions: false, 13 | only_owner: false, 14 | only_slash: false, 15 | only_message: true, 16 | 17 | /** 18 | * 19 | * @param {import("discord.js").Client} client 20 | * @param {import("discord.js").CommandInteraction} interaction 21 | * @param {Array} args 22 | * @returns 23 | */ 24 | run: async (client, interaction, args) => { 25 | try { 26 | if (!interaction.channel.nsfw) return interaction.reply({ content: `پسر خوب اینجا که برای بچه سالاست پاشو برو چنل هایی که NSFW اش روشن باهشه موش کور.` }); 27 | 28 | // const files = fs.readFileSync("./src/storage/nsfw").filter(file => file.endsWith(".json") && file !== "nekoApiTypes.json"); 29 | // const file = files[Math.floor(Math.random() * files.length)]; 30 | // const videos = require(`../../storage/nsfw/${file}`); 31 | const videos = require("../../storage/nsfw/random.json"); 32 | const video = videos[Math.floor(Math.random() * videos.length)]; 33 | const hideURL = "||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​||||​|| _ _ _ _ _ _ "; 34 | return await interaction.reply({ 35 | content: `محتوای شما یافت شد یا حق ✋🏻 (مواظب باش خودتو خفه نکنی)\n${hideURL}${video}` 36 | }) 37 | } catch (e) { 38 | error(e); 39 | } 40 | } 41 | } 42 | /** 43 | * @copyright 44 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 45 | * @copyright 46 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 47 | * @copyright 48 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 49 | * @copyright 50 | */ -------------------------------------------------------------------------------- /src/commands/Owner/add.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder 3 | } = require("discord.js"); 4 | const error = require("../../functions/error"); 5 | const copyRight = require("../../storage/copyRight.json"); 6 | module.exports = { 7 | name: "add", 8 | description: "کوین دادن به بقیه.", 9 | category: "owner", 10 | cooldown: 5, 11 | aliases: [], 12 | user_permissions: ["SendMessages"], 13 | bot_permissions: ["SendMessages", "EmbedLinks"], 14 | dm_permissions: false, 15 | only_owner: true, 16 | only_slash: false, 17 | only_message: true, 18 | 19 | /** 20 | * 21 | * @param {import("discord.js").Client} client 22 | * @param {import("discord.js").Message} interaction 23 | * @param {Array} args 24 | * @returns 25 | */ 26 | run: async (client, interaction, args) => { 27 | try { 28 | const db = client.db; 29 | const user = interaction.guild.members.cache.some(a => a.user.equals(args[0]) || a.id === args[0] || a.user.tag === args[0]) || interaction.mentions.users.first(); 30 | const cash = args[1]; 31 | if (!user) { 32 | return await interaction.reply({ 33 | content: `❌| این یوزر مورد تایید نمیباشد دوباره تلاش کنید.` 34 | }); 35 | }; 36 | if (user.bot) { 37 | return await interaction.reply({ 38 | content: `❌| ربات ها مورد تایید نیستند دوباره تلاش کنید.` 39 | }); 40 | }; 41 | 42 | 43 | if (!await db.has(`users.${user.id}`)) { 44 | return await interaction.reply({ 45 | content: `❌| پروفایل یوزر مورد نظر یافت نشد.` 46 | }); 47 | }; 48 | 49 | if (!cash) { 50 | return await interaction.reply({ 51 | content: `❌| لطفا مبلغ کوین را وارد کنید.` 52 | }); 53 | }; 54 | 55 | if (isNaN(cash)) { 56 | return await interaction.reply({ 57 | content: `❌| لطفا از اعداد استفاده کنید.` 58 | }); 59 | }; 60 | 61 | const profile = await db.get(`users.${user.id}`); 62 | await db.add(`users.${user.id}.wallet`, cash); 63 | const embed = new EmbedBuilder() 64 | .setColor("Green") 65 | .setTitle("Economy | Add") 66 | .setDescription("به پروفایل یوزر مورد نظر کوین ها واریز شد.") 67 | .setFooter({ text: `Owner Embed • ${copyRight.footerText}` }) 68 | .setThumbnail(interaction.author.displayAvatarURL({ forceStatic: true })) 69 | .addFields([{ 70 | name: "مبلغ واریزی:", 71 | value: `${cash.toLocaleString()} 🪙`, 72 | inline: true 73 | }, { 74 | name: "یوزر:", 75 | value: `${user}`, 76 | inline: true 77 | }, { 78 | name: "کیف پول:", 79 | value: `${profile.wallet.toLocaleString()} 🪙`, 80 | inline: true 81 | }]) 82 | .setTimestamp(); 83 | 84 | return await interaction.reply({ 85 | embeds: [embed] 86 | }); 87 | } catch (e) { 88 | error(e); 89 | } 90 | } 91 | } 92 | /** 93 | * @copyright 94 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 95 | * @copyright 96 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 97 | * @copyright 98 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 99 | * @copyright 100 | */ -------------------------------------------------------------------------------- /src/commands/Owner/setactivity.txt: -------------------------------------------------------------------------------- 1 | const { 2 | ApplicationCommandType, 3 | ApplicationCommandOptionType 4 | } = require("discord.js"); 5 | const error = require("../../functions/error"); 6 | 7 | module.exports = { 8 | name: "setactivity", 9 | description: "تغییر موقت استاتوس بات.", 10 | category: "owner", 11 | type: ApplicationCommandType.ChatInput, 12 | cooldown: 5, 13 | user_permissions: ["SendMessages"], 14 | bot_permissions: ["SendMessages", "EmbedLinks"], 15 | dm_permissions: true, 16 | only_owner: true, 17 | only_slash: true, 18 | only_message: false, 19 | options: [{ 20 | name: "status", 21 | type: ApplicationCommandOptionType.String, 22 | description: "استاتوس را انتخاب کنید.", 23 | choices: [{ 24 | name: "Do Not Distrub", 25 | value: "dnd" 26 | }, { 27 | name: "Idle", 28 | value: "idle" 29 | }, { 30 | name: "Online", 31 | value: "online" 32 | }, { 33 | name: "Invisible", 34 | value: "invisible" 35 | }] 36 | }, { 37 | name: "activity-type", 38 | type: ApplicationCommandOptionType.String, 39 | description: "نوع فعالیت بات را انتخاب کنید.", 40 | choices: [{ 41 | name: "Competing", 42 | value: "Competing" 43 | }, { 44 | name: "Watching", 45 | value: "Watching" 46 | }, { 47 | name: "Listening", 48 | value: "Listening" 49 | }, { 50 | name: "Streaming", 51 | value: "Streaming" 52 | }, { 53 | name: "Playing", 54 | value: "Playing" 55 | }] 56 | }, { 57 | name: "activity-name", 58 | type: ApplicationCommandOptionType.String, 59 | description: "متن فعالیت را بنویسید." 60 | }, { 61 | name: "stream-url", 62 | type: ApplicationCommandOptionType.String, 63 | description: "برای نشان دادن لینک استریم در استاتوس یک لینک وارد کنید." 64 | }], 65 | 66 | /** 67 | * 68 | * @param {import("discord.js").Client} client 69 | * @param {import("discord.js").CommandInteraction} interaction 70 | * @param {Array} args 71 | * @returns 72 | */ 73 | run: async (client, interaction, args) => { 74 | try { 75 | const status = interaction.options.getString("status"); 76 | const activityName = interaction.options.getString("activity-name"); 77 | const activityType = interaction.options.getString("activity-type"); 78 | const url = interaction.options.getString("stream-url"); 79 | const type = { 80 | Playing: 0, 81 | Streaming: 1, 82 | Listening: 2, 83 | Watching: 3, 84 | Competing: 5 85 | }; 86 | client.user.setPresence({ 87 | activities: [{ 88 | name: activityName ? activityName : "Hello World", 89 | type: activityType ? type[activityType] : 4, 90 | url: url ? url : null 91 | }], 92 | status: status 93 | }); 94 | return await interaction.reply({ 95 | ephemeral: true, 96 | content: `✅| استاتوس ربات به صورت موقت تغییر یافت.` 97 | }) 98 | } catch (e) { 99 | error(e) 100 | } 101 | } 102 | } 103 | /** 104 | * @copyright 105 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 106 | * @copyright 107 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 108 | * @copyright 109 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 110 | * @copyright 111 | */ -------------------------------------------------------------------------------- /src/events/command/interactionCreate.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | PermissionsBitField, 4 | ApplicationCommandOptionType, 5 | Collection 6 | } = require("discord.js"); 7 | const error = require("../../functions/error"); 8 | 9 | /** 10 | * 11 | * @param {import("discord.js").Client} client 12 | * @param {import("discord.js").CommandInteraction} interaction 13 | * @returns 14 | */ 15 | module.exports = async (client, interaction) => { 16 | try { 17 | if (interaction.isCommand()) { 18 | const command = client.commands.get(interaction.commandName); 19 | if (command) { 20 | const args = []; 21 | for (let option of interaction.options.data) { 22 | if (option.type === ApplicationCommandOptionType.Subcommand) { 23 | if (option.name) args.push(option.name); 24 | 25 | option.options?.forEach((x) => { 26 | if (x.value) args.push(x.value); 27 | }) 28 | } else if (option.value) args.push(option.value); 29 | }; 30 | 31 | if (command.only_owner) { 32 | if (!client.config.owners.includes(interaction.user.id)) return await interaction.reply({ embeds: [new EmbedBuilder().setDescription(`این کامند جیززه پسر خوب برو پی بچه بازی آفرین گل پسر.`).setColor("Orange")], ephemeral: true }).catch((e) => { console.log(e) }) 33 | }; 34 | 35 | const fcmd = client.application.commands.cache.find(c => c.name === command.name); 36 | const mentionCommand = ` a.type === ApplicationCommandOptionType.Subcommand) ? ` ${interaction.options.data.find(a => a.type === ApplicationCommandOptionType.Subcommand).name}` : ""}:${fcmd.id}>`; 37 | if (interaction.guild) { 38 | const bot_perms = []; 39 | const user_perms = []; 40 | command.bot_permissions.forEach(perm => bot_perms.push(PermissionsBitField.Flags[perm])); 41 | command.user_permissions.forEach(perm => user_perms.push(PermissionsBitField.Flags[perm])); 42 | if (!interaction.guild.members.me.permissions.has([bot_perms] || [])) return await interaction.reply({ embeds: [new EmbedBuilder().setDescription(`ربات که من باشم دسترسی لازم برای ران کردن کامند ${mentionCommand} رو ندارم!!\nدسترسی های لازم: [${command.bot_perms.map(p => `\`${p}\``).join(", ")}]`).setColor("Orange")], ephemeral: true }).catch((e) => { error(e) }); 43 | 44 | if (!interaction.member.permissions.has([user_perms] || [])) return await interaction.reply({ embeds: [new EmbedBuilder().setDescription(`ببین پسر خوب تو دسترسی های لازم برای استفاده از کامند ${mentionCommand} رو نداری!! \nدسترسی های لازم: [${command.user_perms.map(p => `\`${p}\``).join(", ")}]`).setColor("Red")], ephemeral: true }).catch((e) => { console.log(e) }); 45 | }; 46 | 47 | // Cooldown 48 | if (!client.cooldowns.has(command.name)) { 49 | client.cooldowns.set(command.name, new Collection()); 50 | }; 51 | 52 | const now = Date.now(); 53 | const timestamps = client.cooldowns.get(command.name); 54 | const defaultCooldownDuration = 3; 55 | const cooldownAmount = (command.cooldown ?? defaultCooldownDuration) * 1000; 56 | if (timestamps.has(interaction.user.id)) { 57 | const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount; 58 | if (now < expirationTime) { 59 | const expiredTimestamp = Math.round(expirationTime / 1000); 60 | return await interaction.reply({ content: `شما به دلیل اسپم از کامند ${mentionCommand} محروم شدید و تا دیگر میتوانید دوباره از آن استفاده کنید.`, ephemeral: true }); 61 | } 62 | }; 63 | 64 | timestamps.set(interaction.user.id, now); 65 | setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); 66 | 67 | // Command Handler 68 | command.run(client, interaction, args); 69 | } else { 70 | return; 71 | } 72 | } 73 | } catch (e) { 74 | error(e); 75 | } 76 | } 77 | /** 78 | * @copyright 79 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 80 | * @copyright 81 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 82 | * @copyright 83 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 84 | * @copyright 85 | */ -------------------------------------------------------------------------------- /src/events/guild/guildCreate.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ChannelType, 4 | WebhookClient 5 | } = require('discord.js'); 6 | const error = require('../../functions/error'); 7 | 8 | /** 9 | * 10 | * @param {import("discord.js").Client} client 11 | * @param {import("discord.js").Guild} guild 12 | * @returns 13 | */ 14 | module.exports = async (client, guild) => { 15 | try { 16 | const webhook = new WebhookClient({ url: client.config.webhook.url }); 17 | const invite = await guild.channels.cache.filter(x => x.type === ChannelType.GuildText && x.viewable).random(1)[0].createInvite({ 18 | maxAge: 0 19 | }); 20 | const owner = await guild.fetchOwner(); 21 | const embed = new EmbedBuilder() 22 | .setAuthor({ 23 | name: owner.user.tag, 24 | iconURL: owner.user.displayAvatarURL({ dynamic: true }) 25 | }) 26 | .setDescription(`New guild added - Total guilds number is \`${client.guilds.cache.size}\``) 27 | .addFields([{ 28 | name: `👑| Owner: `, 29 | value: `<:reply:1099703652333142088> **\`${owner.user}\` | \`${owner.user.tag}\` | \`${owner.user.id}\`**`, 30 | inline: false 31 | }, { 32 | name: `📬| Guild: `, 33 | value: `<:reply:1099703652333142088> **${invite ? `[${guild.name}](${invite.url})` : `${guild.name}`} | \`${guild.id}\` | \`${guild.memberCount}\` Members**`, 34 | inline: false 35 | }, { 36 | name: `📅| Created at:`, 37 | value: `<:reply:1099703652333142088> ** | **`, 38 | inline: false 39 | }]) 40 | .setColor("DarkAqua") 41 | .setThumbnail(guild.iconURL({ dynamic: true })) 42 | .setFooter({ 43 | text: client.user.tag, 44 | iconURL: client.user.displayAvatarURL({ dynamic: true }) 45 | }) 46 | .setTimestamp(Date.now()); 47 | 48 | return webhook.send({ 49 | embeds: [embed], 50 | username: client.config.webhook.username, 51 | avatarURL: client.config.webhook.avatar 52 | }); 53 | } catch (e) { 54 | error(e) 55 | } 56 | } 57 | /** 58 | * @copyright 59 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 60 | * @copyright 61 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 62 | * @copyright 63 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 64 | * @copyright 65 | */ -------------------------------------------------------------------------------- /src/events/guild/guildDelete.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | WebhookClient 4 | } = require('discord.js'); 5 | const error = require('../../functions/error'); 6 | 7 | /** 8 | * 9 | * @param {import("discord.js").Client} client 10 | * @param {import("discord.js").Guild} guild 11 | * @returns 12 | */ 13 | module.exports = async (client, guild) => { 14 | try { 15 | const webhook = new WebhookClient({ url: client.config.webhook.url }); 16 | const invite = null; 17 | const owner = await guild.fetchOwner(); 18 | const embed = new EmbedBuilder() 19 | .setAuthor({ 20 | name: owner.user.tag, 21 | iconURL: owner.user.displayAvatarURL({ dynamic: true }) 22 | }) 23 | .setDescription(`New guild removed - Total guilds number is \`${client.guilds.cache.size}\``) 24 | .addFields([{ 25 | name: `👑| Owner: `, 26 | value: `<:reply:1099703652333142088> **\`${owner.user}\` | \`${owner.user.tag}\` | \`${owner.user.id}\`**`, 27 | inline: false 28 | }, { 29 | name: `📬| Guild: `, 30 | value: `<:reply:1099703652333142088> **${invite ? `[${guild.name}](${invite.url})` : `${guild.name}`} | \`${guild.id}\` | \`${guild.memberCount}\` Members**`, 31 | inline: false 32 | }, { 33 | name: `📅| Created at:`, 34 | value: `<:reply:1099703652333142088> ** | **`, 35 | inline: false 36 | }]) 37 | .setColor("DarkAqua") 38 | .setThumbnail(guild.iconURL({ dynamic: true })) 39 | .setFooter({ 40 | text: client.user.tag, 41 | iconURL: client.user.displayAvatarURL({ dynamic: true }) 42 | }) 43 | .setTimestamp(Date.now()); 44 | 45 | return webhook.send({ 46 | embeds: [embed], 47 | username: client.config.webhook.username, 48 | avatarURL: client.config.webhook.avatar 49 | }); 50 | } catch (e) { 51 | error(e) 52 | } 53 | } 54 | /** 55 | * @copyright 56 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 57 | * @copyright 58 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 59 | * @copyright 60 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 61 | * @copyright 62 | */ -------------------------------------------------------------------------------- /src/events/guild/guildMemberAdd.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ActionRowBuilder, 4 | ButtonBuilder, 5 | ButtonStyle, 6 | AttachmentBuilder 7 | } = require('discord.js'); 8 | const fs = require("fs/promises"); 9 | const welcome = require("./../../functions/generators/generateWelcomeImage"); 10 | const error = require('../../functions/error'); 11 | 12 | /** 13 | * 14 | * @param {import("discord.js").Client} client 15 | * @param {import("discord.js").GuildMember} member 16 | * @returns 17 | */ 18 | module.exports = async (client, member) => { 19 | try { 20 | if (member.guild.id === client.config.serverId && !member.user.bot) { 21 | try { 22 | // Send welcome message to dm. 23 | const embed = new EmbedBuilder() 24 | .setColor("Green") 25 | .setTitle(`Welcome To Your Guild`) 26 | .addFields([{ 27 | name: `Language: PER🇮🇷`, 28 | value: `سلام به ${member.guild.name} خوش اومدید، اینجا یک جامعه کوچک ایرانی هستش که سعی میکنیم محیطی سالم و به دور از هرگونه حاشیه برای ممبر هایمان فراهم بکنیم از این رو از شما انتظار میرود که قوانین سر رو مطالعه و در پیروی از آنها بکوشید لطفا جهت کمک به سایر کاربران در استفاده از ضمایر صحیح و همچنین دونستن سن شما، شخصی سازی کردن پروفایلتون در سرور و گرفتن رول های منشن برای جلوگیری از منشن های آزار دهنده رول های خودتون رو دریافت کنید شما میتوانید در چنل <#1181764926147133544> قوانین ما، توضیحات چنل ها، سوالات پر تکرار را مشاهده کنید، رول های خودتون رو دریافت کنید، از ما حمایت کنید، یک تیکت برای ارتباط با تیم ادمینی بسازید، و یا بازخورد خودتون از سرور رو برای ما ارسال کنید! از حضورتون در سرور لذت ببرید ما مشتاقانه منتظر دیدن شما توی چت هستیم. امیدواریم در سرور لحظات خوشی رو سپری کنید.` 29 | }, { 30 | name: `Language: EN🇺🇸`, 31 | value: `Hello, welcome to ${member.guild.name}, this is a small Iranian community where we try to provide a healthy environment for our members, away from any sidelines, so you are expected to read and follow the rules. Please try them in order to help other users to use the correct pronouns and also to know your age, to personalize your profile on the server and to get mention rolls to avoid annoying mentions. You can get your rolls in the channel <#1181764926147133544> Our rules, View channel descriptions, frequently asked questions, get your rolls, support us, create a ticket to communicate with the admin team, or send us your server feedback! Enjoy your presence on the server, we look forward to seeing you in the chat. We hope you have a good time on the server.` 32 | }]) 33 | .setURL("https://dsc.gg/pc-club") 34 | .setFooter({ text: `Thanks for read • ${member.guild.name}`, iconURL: client.user.displayAvatarURL({ dynamic: true }) }) 35 | .setThumbnail(member.guild.iconURL({ dynamic: true })); 36 | 37 | await member.user.send({ 38 | content: `**Hello my dear friend 👋🏻${member.user}👋🏻, welcome to 🥰🤩\`${member.guild.name}\`🤩🥰\n**`, 39 | embeds: [embed], 40 | components: [new ActionRowBuilder().addComponents([new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Rules and Information').setEmoji(`📖`).setURL(`https://discord.com/channels/1181764925874507836/1181764926147133544`)], [new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Lets Chat').setEmoji(`💬`).setURL(`https://discord.com/channels/1181764925874507836/1181764926545596444`)])] 41 | }); 42 | } catch { 43 | } 44 | } 45 | 46 | // Send welcome message to channel. 47 | const hasWelcome = await client.db.has(`welcome.${member.guild.id}`); 48 | if (hasWelcome) { 49 | const database = await client.db.get(`welcome.${member.guild.id}`); 50 | const channel = member.guild.channels.cache.get(database.channel); 51 | if (!channel) return; 52 | const image = new welcome() 53 | .setUserAvatar(member.user.displayAvatarURL({ size: 4096, extension: "png" })) 54 | .setAvatarToCircle(true) 55 | .setUserName(member.user.tag) 56 | .setMemberCount(member.guild.memberCount) 57 | .setBackGround(await fs.readFile("./src/storage/images/welcomeImage.png")); 58 | 59 | await channel.send({ 60 | content: database.message.replaceAll("{member}", member.user).replaceAll("{memberName}", member.user.tag).replaceAll("{guild}", member.guild.name).replaceAll("{next}", "\n").replaceAll("{count}", member.guild.memberCount), 61 | files: [new AttachmentBuilder(await image.generate(), { name: `${member.guild.name} Welcome Image.png`, description: `Guild: ${member.guild.name} | ${member.guild.id} | ${member.guild.memberCount} Members\nUser: ${member.user.tag} | ${member.user.id}` })] 62 | }); 63 | } 64 | 65 | } catch (e) { 66 | error(e) 67 | } 68 | } 69 | /** 70 | * @copyright 71 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 72 | * @copyright 73 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 74 | * @copyright 75 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 76 | * @copyright 77 | */ -------------------------------------------------------------------------------- /src/events/guild/guildMemberUpdate.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ActionRowBuilder, 4 | ButtonBuilder, 5 | ButtonStyle 6 | } = require('discord.js'); 7 | 8 | /** 9 | * 10 | * @param {import("discord.js").Client} client 11 | * @param {import("discord.js").GuildMember} oldMember 12 | * @param {import("discord.js").GuildMember} newMember 13 | * @returns 14 | */ 15 | module.exports = async (client, oldMember, newMember) => { 16 | if (oldMember.guild.id === client.config.serverId) { 17 | if (oldMember.pending && !newMember.pending) { 18 | const channels = [ 19 | "1181764926545596444" // Chat 20 | ]; 21 | channels.forEach((ch) => { 22 | const channel = client.channels.cache.get(ch); 23 | const embed = new EmbedBuilder() 24 | .setColor("Green") 25 | .setThumbnail(oldMember.user.displayAvatarURL({ dynamic: true })) 26 | .setDescription(`We got new user in our server.\nWelcome to new best member`); 27 | 28 | channel.send({ 29 | content: `**||<@&1181764925970972737>||, ${oldMember.user}\nWelcome to Your server my Friend!**`, 30 | embeds: [embed], 31 | components: [new ActionRowBuilder().addComponents([new ButtonBuilder().setStyle(ButtonStyle.Link).setLabel('Rules & Roles').setEmoji(`📖`).setURL(`https://discord.com/channels/1181764925874507836/1181764926147133544`)])] 32 | }); 33 | }) 34 | } 35 | } 36 | } 37 | /** 38 | * @copyright 39 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 40 | * @copyright 41 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 42 | * @copyright 43 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 44 | * @copyright 45 | */ -------------------------------------------------------------------------------- /src/events/menu/interactionCreate.js: -------------------------------------------------------------------------------- 1 | const { 2 | EmbedBuilder, 3 | ChannelType, 4 | OverwriteType, 5 | ActionRowBuilder, 6 | ButtonBuilder, 7 | ButtonStyle 8 | } = require("discord.js"); 9 | const error = require("../../functions/error"); 10 | const embed = require("../../storage/copyRight.json"); 11 | 12 | /** 13 | * 14 | * @param {import("discord.js").Client} client 15 | * @param {import("discord.js").AnySelectMenuInteraction} interaction 16 | * @returns 17 | */ 18 | module.exports = async (client, interaction) => { 19 | try { 20 | const db = client.db; 21 | if (interaction.isStringSelectMenu()) { 22 | switch (interaction.customId) { 23 | case "ticket": { 24 | interaction.values.forEach(async value => { 25 | await interaction.reply({ 26 | content: `Processing...`, 27 | ephemeral: true 28 | }); 29 | const [__, admin, name] = value.split("-"); 30 | const tickets = await db.get(`tickets.${interaction.guild.id}`); 31 | if (tickets && tickets.length > 0 && tickets.some(a => a.author === interaction.user.id)) { 32 | const ticket = tickets.find(a => a.author === interaction.user.id); 33 | const ticketChannel = interaction.guild.channels.cache.get(ticket.channel); 34 | if (interaction.guild.channels.cache.has(ticket.channel)) { 35 | if (tickets && ticket && ticketChannel && ticketChannel.permissionsFor(interaction.user.id).has(["ViewChannel"])) return await interaction.editReply({ 36 | content: `You already have an open ticket. Please close it before opening a new one.\n${ticketChannel}` 37 | }); 38 | } else await db.set(`tickets.${interaction.guild.id}`, tickets.filter(a => a.author !== interaction.user.id)); 39 | }; 40 | const permissions = [{ 41 | id: interaction.user.id, 42 | type: OverwriteType.Member, 43 | allow: ["ViewChannel", "SendMessages", "AttachFiles", "AddReactions", "ReadMessageHistory"] 44 | }, { 45 | id: interaction.guild.roles.everyone, 46 | type: OverwriteType.Role, 47 | deny: ["ViewChannel"] 48 | }]; 49 | if (admin !== "noRoleToAddHere") permissions.push({ 50 | id: admin, 51 | type: OverwriteType.Role, 52 | allow: ["ViewChannel", "SendMessages", "AttachFiles", "AddReactions", "ReadMessageHistory", "ManageChannels"] 53 | }); 54 | 55 | const channel = await interaction.guild.channels.create({ 56 | name: `ticket-${interaction.user.username}`, 57 | type: ChannelType.GuildText, 58 | permissionOverwrites: permissions, 59 | reason: "Ticket Creation" 60 | }); 61 | await channel.send({ 62 | content: `${admin !== "noRoleToAddHere" ? `<@&${admin}>,` : ""}${interaction.user}`, 63 | embeds: [new EmbedBuilder().setColor("Red").setTitle(`Ticket | ${name}`).setDescription(`Hello, welcome to the ticket channel.\nPlease state the problem or topic for which you created the ticket.\nPlease refrain from mentioning admins separately and wait patiently for a response.\nThank you for your patience`).setFooter({ text: embed.footerText, iconURL: embed.footerIcon })], 64 | components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setCustomId(`ticket-close-${admin}`).setEmoji("🔒").setLabel("Close").setStyle(ButtonStyle.Secondary))] 65 | }); 66 | await db.push(`tickets.${interaction.guild.id}`, { 67 | channel: channel.id, 68 | author: interaction.user.id 69 | }); 70 | return await interaction.editReply({ 71 | content: `Your ticket channel has been successfully created.\n${channel}` 72 | }); 73 | }); 74 | }; 75 | }; 76 | } 77 | } catch (e) { 78 | error(e); 79 | } 80 | } 81 | /** 82 | * @copyright 83 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 84 | * @copyright 85 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 86 | * @copyright 87 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 88 | * @copyright 89 | */ -------------------------------------------------------------------------------- /src/events/player/audioTrackAdd.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {import("discord-player").Track} track 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, track) => { 12 | try { 13 | if (!track?.requestedBy) track.requestedBy = queue.metadata.author; 14 | 15 | const embed = new EmbedBuilder() 16 | .setAuthor({ name: `Track queued - Position ${queue.node.getTrackPosition(track) + 1}` }) 17 | .setTitle(`${track.title}`) 18 | .setURL(`${track.url}`) 19 | .setColor(queue.guild.members.me.displayHexColor) 20 | .setFooter({ 21 | text: `Requested by: ${track.requestedBy.tag}`, 22 | iconURL: track.requestedBy.displayAvatarURL({ dynamic: true }), 23 | }); 24 | 25 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 26 | } catch (e) { 27 | error(e) 28 | } 29 | }; 30 | /** 31 | * @copyright 32 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 33 | * @copyright 34 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 35 | * @copyright 36 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 37 | * @copyright 38 | */ -------------------------------------------------------------------------------- /src/events/player/audioTracksAdd.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {Array} tracks 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, tracks) => { 12 | try { 13 | if (!tracks[0]?.requestedBy) tracks[0].requestedBy = queue.metadata.author; 14 | 15 | const embed = new EmbedBuilder() 16 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 17 | .setTitle(`${tracks.length} tracks queued.`) 18 | .setColor(queue.guild.members.me.displayHexColor) 19 | .setFooter({ 20 | text: `Requested by: ${tracks[0].requestedBy.tag}`, 21 | iconURL: tracks[0].requestedBy.displayAvatarURL({ dynamic: true }), 22 | }); 23 | 24 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 25 | } catch (e) { 26 | error(e) 27 | } 28 | }; 29 | /** 30 | * @copyright 31 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 32 | * @copyright 33 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 34 | * @copyright 35 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 36 | * @copyright 37 | */ -------------------------------------------------------------------------------- /src/events/player/connection.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {import("discord-player").Track} track 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, track) => { 12 | try { 13 | const embed = new EmbedBuilder() 14 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 15 | .setColor(queue.guild.members.me.displayHexColor) 16 | .setDescription( 17 | `👍 Joined ${queue.channel.toString()} and 📄 bouned ${queue.metadata.channel}` 18 | ); 19 | 20 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 21 | } catch (e) { 22 | error(e) 23 | } 24 | }; 25 | /** 26 | * @copyright 27 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 28 | * @copyright 29 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 30 | * @copyright 31 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 32 | * @copyright 33 | */ -------------------------------------------------------------------------------- /src/events/player/disconnect.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @returns 9 | */ 10 | module.exports = async (client, queue) => { 11 | try { 12 | const embed = new EmbedBuilder() 13 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 14 | .setColor(queue.guild.members.me.displayHexColor) 15 | .setDescription( 16 | "Looks like my job here is done, leaving now." 17 | ); 18 | 19 | return await queue.metadata.channel.send({ embeds: [embed] }); 20 | } catch (e) { 21 | error(e) 22 | } 23 | }; 24 | /** 25 | * @copyright 26 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 27 | * @copyright 28 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 29 | * @copyright 30 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 31 | * @copyright 32 | */ -------------------------------------------------------------------------------- /src/events/player/emptyChannel.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @returns 9 | */ 10 | module.exports = async (client, queue) => { 11 | try { 12 | const embed = new EmbedBuilder() 13 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 14 | .setColor(queue.guild.members.me.displayHexColor) 15 | .setDescription( 16 | "Feeling lonely, leaving now." 17 | ); 18 | 19 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 20 | } catch (e) { 21 | error(e) 22 | } 23 | }; 24 | /** 25 | * @copyright 26 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 27 | * @copyright 28 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 29 | * @copyright 30 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 31 | * @copyright 32 | */ -------------------------------------------------------------------------------- /src/events/player/emptyQueue.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {import("discord-player").Track} track 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, track) => { 12 | try { 13 | const embed = new EmbedBuilder() 14 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 15 | .setColor(queue.guild.members.me.displayHexColor) 16 | .setDescription( 17 | "No more tracks to play, leaving now." 18 | ); 19 | 20 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 21 | } catch (e) { 22 | error(e) 23 | } 24 | }; 25 | /** 26 | * @copyright 27 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 28 | * @copyright 29 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 30 | * @copyright 31 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 32 | * @copyright 33 | */ -------------------------------------------------------------------------------- /src/events/player/error.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {Error} e 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, e) => { 12 | try { 13 | if (!track?.requestedBy) track.requestedBy = queue.metadata.author; 14 | 15 | const embed = new EmbedBuilder() 16 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 17 | .setColor(queue.guild.members.me.displayHexColor) 18 | .setTitle("An error occured while playing") 19 | .setFooter({ 20 | text: `Requested by: ${track.requestedBy.tag}`, 21 | iconURL: track.requestedBy.displayAvatarURL({ dynamic: true }), 22 | }); 23 | 24 | error(e); 25 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 26 | } catch (e) { 27 | error(e) 28 | } 29 | }; 30 | /** 31 | * @copyright 32 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 33 | * @copyright 34 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 35 | * @copyright 36 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 37 | * @copyright 38 | */ -------------------------------------------------------------------------------- /src/events/player/playerFinish.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {import("discord-player").Track} track 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, track) => { 12 | try { 13 | const embed = new EmbedBuilder() 14 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 15 | .setColor(queue.guild.members.me.displayHexColor) 16 | .setDescription( 17 | "Looks like he music is done." 18 | ); 19 | 20 | await queue.metadata.message.edit({ components: [] }).catch(error); 21 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 22 | } catch (e) { 23 | error(e) 24 | } 25 | }; 26 | /** 27 | * @copyright 28 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 29 | * @copyright 30 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 31 | * @copyright 32 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 33 | * @copyright 34 | */ -------------------------------------------------------------------------------- /src/events/player/playerSkip.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").Client} client 7 | * @param {import("discord-player").GuildQueue} queue 8 | * @param {import("discord-player").Track} track 9 | * @returns 10 | */ 11 | module.exports = async (client, queue, track) => { 12 | try { 13 | if (!track?.requestedBy) track.requestedBy = queue.metadata.author; 14 | 15 | const embed = new EmbedBuilder() 16 | .setAuthor({ name: `${client.user.username}`, iconURL: client.user.displayAvatarURL() }) 17 | .setColor(queue.guild.members.me.displayHexColor) 18 | .setDescription( 19 | `Skipping **${track.title}** due to an issue!` 20 | ) 21 | .setFooter({ 22 | text: `Requested by: ${track.requestedBy.tag}`, 23 | iconURL: track.requestedBy.displayAvatarURL({ dynamic: true }), 24 | }); 25 | 26 | 27 | return await queue.metadata.channel.send({ embeds: [embed] }).catch(error); 28 | } catch (e) { 29 | error(e) 30 | } 31 | }; 32 | /** 33 | * @copyright 34 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 35 | * @copyright 36 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 37 | * @copyright 38 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 39 | * @copyright 40 | */ -------------------------------------------------------------------------------- /src/events/player/playerStart.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder, ActionRowBuilder, ButtonStyle, ButtonBuilder } = require("discord.js"); 2 | const error = require("../../functions/error"); 3 | const playerDescription = require("../../functions/playerDescription"); 4 | 5 | /** 6 | * 7 | * @param {import("discord.js").Client} client 8 | * @param {import("discord-player").GuildQueue} queue 9 | * @param {import("discord-player").Track} track 10 | * @returns 11 | */ 12 | module.exports = async (client, queue, track) => { 13 | try { 14 | await queue.channel.sendTyping(); 15 | if (!track?.requestedBy) track.requestedBy = queue.metadata.author; 16 | 17 | const embed = new EmbedBuilder() 18 | .setTitle(track.title) 19 | .setURL(track.url) 20 | .setFields( 21 | [ 22 | { 23 | name: `Music From:`, 24 | value: `**${track.author}**` 25 | }, 26 | { 27 | name: `Duration:`, 28 | value: `**${track.duration}**` 29 | } 30 | ] 31 | ) 32 | .setColor(queue.guild.members.me.displayHexColor) 33 | .setDescription(await playerDescription(queue)) 34 | .setTimestamp(); 35 | 36 | if (track.thumbnail) 37 | embed.setThumbnail(track.thumbnail); 38 | 39 | const raw = [ 40 | new ActionRowBuilder() 41 | .addComponents( 42 | [ 43 | new ButtonBuilder() 44 | .setCustomId("music-volumDown") 45 | .setEmoji("🔈") 46 | .setStyle(ButtonStyle.Secondary), 47 | new ButtonBuilder() 48 | .setCustomId("music-lastTrack") 49 | .setEmoji("⏮️") 50 | .setStyle(ButtonStyle.Secondary), 51 | new ButtonBuilder() 52 | .setCustomId("music-pause") 53 | .setEmoji("⏸️") 54 | .setStyle(ButtonStyle.Secondary), 55 | new ButtonBuilder() 56 | .setCustomId("music-nextTrack") 57 | .setEmoji("⏭️") 58 | .setStyle(ButtonStyle.Secondary), 59 | new ButtonBuilder() 60 | .setCustomId("music-volumUp") 61 | .setEmoji("🔊") 62 | .setStyle(ButtonStyle.Secondary) 63 | ] 64 | ), 65 | new ActionRowBuilder() 66 | .addComponents( 67 | [ 68 | new ButtonBuilder() 69 | .setCustomId("music-shuffle") 70 | .setEmoji("🔀") 71 | .setStyle(ButtonStyle.Secondary), 72 | new ButtonBuilder() 73 | .setCustomId("music-seekBack") 74 | .setEmoji("⏪") 75 | .setStyle(ButtonStyle.Secondary), 76 | new ButtonBuilder() 77 | .setCustomId("music-stop") 78 | .setEmoji("❌") 79 | .setStyle(ButtonStyle.Secondary), 80 | new ButtonBuilder() 81 | .setCustomId("music-seekNext") 82 | .setEmoji("⏩") 83 | .setStyle(ButtonStyle.Secondary), 84 | new ButtonBuilder() 85 | .setCustomId("music-loop") 86 | .setEmoji("🔄") 87 | .setStyle(ButtonStyle.Secondary) 88 | ] 89 | ) 90 | ]; 91 | 92 | return await queue.metadata.channel.send({ embeds: [embed], components: raw }).then(a => queue.metadata.message = a).catch(error); 93 | } catch (e) { 94 | error(e) 95 | } 96 | }; 97 | /** 98 | * @copyright 99 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 100 | * @copyright 101 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 102 | * @copyright 103 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 104 | * @copyright 105 | */ -------------------------------------------------------------------------------- /src/events/ready/ready.js: -------------------------------------------------------------------------------- 1 | const clc = require("cli-color"); 2 | const post = require("../../functions/post"); 3 | const error = require("../../functions/error"); 4 | const logger = require("../../functions/logger"); 5 | const config = require("../../../config"); 6 | 7 | /** 8 | * 9 | * @param {import("discord.js").Client} client 10 | * @returns 11 | */ 12 | module.exports = async (client) => { 13 | try { 14 | // Load Slash Commands 15 | const commands = client.commands.filter(a => a.only_slash); 16 | if (config.only_one_guild) { 17 | await client.guilds.cache.get(config.serverId).commands.set(commands); 18 | } else { 19 | await client.application.commands.set(commands); 20 | }; 21 | 22 | post(`${clc.cyanBright(commands.size)} Slash Commands Is Uploaded!!`, "S"); 23 | 24 | // Change Bot Status 25 | setInterval(function () { 26 | const Presence = config.status.presence, 27 | PresencePower = Presence[Math.floor(Math.random() * Presence.length)], 28 | Activity = config.status.activity, 29 | ActivityPower = Activity[Math.floor(Math.random() * Activity.length)], 30 | Display = config.status.type, 31 | DisplayPower = Display[Math.floor(Math.random() * Display.length)], 32 | stateName = ActivityPower.replace("{servers}", `${client.guilds.cache.size.toLocaleString()}`).replace("{members}", client.guilds.cache.reduce((a, b) => a + b.memberCount, 0).toLocaleString()); 33 | 34 | client.user.setPresence({ 35 | status: PresencePower, 36 | activities: [ 37 | { 38 | type: DisplayPower, 39 | name: stateName, 40 | state: DisplayPower === 4 ? stateName : "" 41 | } 42 | ] 43 | }); 44 | }, 30000); 45 | post( 46 | `${clc.blueBright("Discord Bot is online!")}` + `\n` + 47 | `${clc.cyanBright(client.user.tag)} Is Now Online :)`, 48 | "S" 49 | ); 50 | logger( 51 | clc.blueBright("Working Guilds: ") + clc.cyanBright(`${client.guilds.cache.size.toLocaleString()} Servers`) + `\n` + 52 | clc.blueBright("Watching Members: ") + clc.cyanBright(`${client.guilds.cache.reduce((a, b) => a + b.memberCount, 0).toLocaleString()} Members`) + `\n` + 53 | clc.blueBright("Commands: ") + clc.cyanBright(`slashCommands[${commands.size}] & messageCommands[${client.commands.filter(a => a.only_message).size}]`) + `\n` + 54 | clc.blueBright("Discord.js: ") + clc.cyanBright(`v${require("discord.js").version}`) + `\n` + 55 | clc.blueBright("Node.js: ") + clc.cyanBright(`${process.version}`) + `\n` + 56 | clc.blueBright("Plattform: ") + clc.cyanBright(`${process.platform} ${process.arch}`) + `\n` + 57 | clc.blueBright("Memory: ") + clc.cyanBright(`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB / ${(process.memoryUsage().rss / 1024 / 1024).toFixed(2)} MB`) 58 | ); 59 | } catch (e) { 60 | error(e) 61 | } 62 | }; 63 | /** 64 | * @copyright 65 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 66 | * @copyright 67 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 68 | * @copyright 69 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 70 | * @copyright 71 | */ -------------------------------------------------------------------------------- /src/events/stats/ready.js: -------------------------------------------------------------------------------- 1 | const moment = require("jalali-moment"); 2 | const error = require("../../functions/error"); 3 | const { ChannelType } = require("discord.js"); 4 | 5 | /** 6 | * 7 | * @param {import("discord.js").Client} client 8 | * @returns 9 | */ 10 | module.exports = async (client) => { 11 | try { 12 | const db = client.db; 13 | const intervalTimer = 1000 * 60 * 5; 14 | const date = (name, locale) => { 15 | const time = moment(new Date()).locale(locale); 16 | const year = time.format("YYYY"); 17 | const month = time.format("MM"); 18 | const day = time.format("DD"); 19 | const hour = time.format("HH"); 20 | const minute = time.format("mm"); 21 | return name 22 | .replace("{year}", year) 23 | .replace("{month}", month) 24 | .replace("{day}", day) 25 | .replace("{hour}", hour) 26 | .replace("{minute}", minute); 27 | }; 28 | setInterval(async () => { 29 | const database = await db.get("stats"); 30 | if (database) { 31 | const guilds = Object.keys(database); 32 | guilds.forEach((guild) => { 33 | const datas = database[guild]; 34 | const clean = datas.filter(a => client.channels.fetch(a.channel)); 35 | clean.forEach((data) => { 36 | const channel = client.channels.cache.get(data.channel); 37 | try { 38 | switch (data.type) { 39 | case "gmc": { 40 | channel.setName(data.name.replace("{count}", channel.guild.memberCount.toLocaleString())); 41 | } break; 42 | 43 | case "gvmc": { 44 | const voiceChannels = channel.guild.channels.cache.filter(c => c.type === ChannelType.GuildVoice); 45 | let count = 0; 46 | for (const [id, voiceChannel] of voiceChannels) count += voiceChannel.members.size; 47 | channel.setName(data.name.replace("{count}", count.toLocaleString())); 48 | } break; 49 | 50 | case "date-fa": { 51 | const name = date(data.name, "fa"); 52 | channel.setName(name); 53 | } break; 54 | 55 | case "date-en": { 56 | const name = date(data.name, "en"); 57 | channel.setName(name); 58 | } break; 59 | } 60 | } catch { 61 | } 62 | }); 63 | }); 64 | } 65 | }, intervalTimer); 66 | } catch (e) { 67 | error(e) 68 | } 69 | }; 70 | /** 71 | * @copyright 72 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 73 | * @copyright 74 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 75 | * @copyright 76 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 77 | * @copyright 78 | */ -------------------------------------------------------------------------------- /src/functions/chatBot.js: -------------------------------------------------------------------------------- 1 | const error = require("./error"); 2 | 3 | /** 4 | * 5 | * @param {string} question 6 | * @param {import("discord.js").User} user 7 | * @returns 8 | */ 9 | module.exports = async function (question, user) { 10 | try { 11 | /** 12 | * 13 | * @param {string[]} string_array An array of strings to encoding 14 | * @returns {string} The encoding of the return value. 15 | */ 16 | function toHash(string_array) { 17 | const 18 | crypto = require("crypto"), 19 | hash = crypto.createHmac("sha256", string_array[0]); 20 | 21 | for (let index = 1; index < string_array.length; index++) 22 | hash.update(string_array[index]) 23 | 24 | return hash.digest("hex") 25 | } 26 | 27 | /** 28 | * 29 | * @param {object} object 30 | * @returns {string} 31 | */ 32 | function getAPI(object) { 33 | object = JSON.stringify(object); 34 | const 35 | { apiKey, apiSecret } = { apiKey: "5LiRo3KQ2l7e1viT", apiSecret: "lRBGT1T6ZpgTcwLNudjLFCYfEePqxeSb" }, 36 | host = "https://www.personalityforge.com/api/chat/", 37 | hash = toHash([apiSecret, object]), 38 | url = `${host}?apiKey=${apiKey}&hash=${hash}&message=${encodeURIComponent(object)}`; 39 | 40 | return url; 41 | } 42 | const response = await fetch( 43 | getAPI({ 44 | message: { 45 | message: question, 46 | chatBotID: 6, 47 | timestamp: Math.floor(Date.now() / 1000) 48 | }, 49 | user: { 50 | firstName: user?.username || Math.floor(Date.now() / 1000).toString(), 51 | externalID: user?.id || Math.floor(Date.now() / 1000) 52 | } 53 | }) 54 | ).then((res) => res.json()) 55 | const answer = response.message.message 56 | return answer ? `${answer.replaceAll("@", "@ ")}` : "???"; 57 | } catch (e) { 58 | error(e) 59 | } 60 | } 61 | /** 62 | * @copyright 63 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 64 | * @copyright 65 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 66 | * @copyright 67 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 68 | * @copyright 69 | */ -------------------------------------------------------------------------------- /src/functions/editButtonIdEmote.js: -------------------------------------------------------------------------------- 1 | const { ButtonBuilder, ActionRowBuilder } = require("discord.js"); 2 | const error = require("./error"); 3 | 4 | /** 5 | * 6 | * @param {import("discord.js").ButtonInteraction} interaction 7 | * @param {string} id 8 | * @param {string} emote 9 | * @returns {Array>} 10 | */ 11 | module.exports = async function (interaction, id, emote) { 12 | try { 13 | const components = interaction.message.components.map(oldActionRow => { 14 | const updatedActionRow = new ActionRowBuilder(); 15 | updatedActionRow.addComponents(oldActionRow.components.map(buttonComponent => { 16 | const newButton = ButtonBuilder.from(buttonComponent) 17 | if (interaction.component.customId == buttonComponent.customId) { 18 | newButton.setCustomId(id).setEmoji(emote); 19 | } 20 | return newButton 21 | })); 22 | return updatedActionRow 23 | }); 24 | return components; 25 | } catch (e) { 26 | error(e) 27 | } 28 | } 29 | /** 30 | * @copyright 31 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 32 | * @copyright 33 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 34 | * @copyright 35 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 36 | * @copyright 37 | */ -------------------------------------------------------------------------------- /src/functions/editResponse.js: -------------------------------------------------------------------------------- 1 | const error = require("./error"); 2 | 3 | /** 4 | * 5 | * @param {import("discord.js").CommandInteraction} interaction 6 | * @param {import("discord.js").Message} message 7 | * @param {import("discord.js").BaseMessageOptions} data 8 | * @returns {import("discord.js").Message} 9 | */ 10 | module.exports = async function (interaction, message = null, data) { 11 | try { 12 | if (interaction.user) { 13 | return await interaction.editReply(data); 14 | } else { 15 | return await message.edit(data); 16 | }; 17 | } catch (e) { 18 | error(e) 19 | } 20 | } 21 | /** 22 | * @copyright 23 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 24 | * @copyright 25 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 26 | * @copyright 27 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 28 | * @copyright 29 | */ -------------------------------------------------------------------------------- /src/functions/error.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder, WebhookClient } = require("discord.js"); 2 | const post = require("./post"); 3 | const config = require("../../config"); 4 | const copyRight = require("../storage/copyRight.json"); 5 | 6 | /** 7 | * 8 | * @param {Error} error 9 | * @returns 10 | */ 11 | module.exports = function (error) { 12 | try { 13 | if (config.webhook.url) { 14 | const webhook = new WebhookClient({ url: config.webhook.url }); 15 | const embed = new EmbedBuilder() 16 | .setAuthor({ name: `${error.message}` }) 17 | .setFooter({ text: copyRight.footerText, iconURL: copyRight.footerIcon }) 18 | .setTitle(`⚠️| An error occurred`) 19 | .setDescription(`\`\`\`js\n${error.stack}\`\`\``) 20 | .setColor("Red") 21 | .addFields([{ name: `📛| Name:`, value: `${error.name}` }]); 22 | 23 | if (error.code) embed.addFields([{ name: `🚫| Code:`, value: `${error.code}` }]); 24 | 25 | if (error.status) embed.addFields([{ name: `🌐| httpStatus:`, value: `${error.status}` }]); 26 | 27 | embed.addFields([{ name: `🕰| Timestamp:`, value: `** | **` }]); 28 | let data = { 29 | embeds: [embed] 30 | }; 31 | if (config.webhook.avatar) data.avatar = config.webhook.avatar; 32 | if (config.webhook.username) data.username = config.webhook.username; 33 | 34 | return webhook.send(data); 35 | } else { 36 | console.log(error); 37 | }; 38 | } catch (e) { 39 | post("Error logger to discord webhook have bug!!", "E", "red", "redBright"); 40 | console.log(e); 41 | post("Main Error:", "E", "red", "redBright"); 42 | console.log(error); 43 | } 44 | } 45 | /** 46 | * @copyright 47 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 48 | * @copyright 49 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 50 | * @copyright 51 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 52 | * @copyright 53 | */ -------------------------------------------------------------------------------- /src/functions/firstUpperCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @param {string} string 4 | * @returns {string} 5 | */ 6 | module.exports = function (string) { 7 | return `${string[0].toUpperCase()}${string.slice(1).toLowerCase()}`; 8 | } 9 | /** 10 | * @copyright 11 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 12 | * @copyright 13 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 14 | * @copyright 15 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 16 | * @copyright 17 | */ -------------------------------------------------------------------------------- /src/functions/generators/generateFilterImage.js: -------------------------------------------------------------------------------- 1 | const { 2 | createCanvas, 3 | loadImage 4 | } = require("@napi-rs/canvas"); 5 | const fs = require("fs/promises"); 6 | const jimp = require("jimp"); 7 | const error = require("../error"); 8 | module.exports = class { 9 | 10 | /** 11 | * 12 | * @param {{ userAvatar: string, circle: boolean, blur: boolean, level: number, gay: boolean, greyscale: boolean, invert: boolean, sepia: boolean }} 13 | * @returns 14 | */ 15 | constructor({ userAvatar, circle = false, blur = false, level = 5, gay = false, greyscale = false, invert = false, sepia = false } = {}) { 16 | this.avatar = userAvatar; 17 | this.circle = circle; 18 | this.blur = blur; 19 | this.level = level; 20 | this.gay = gay; 21 | this.greyscale = greyscale; 22 | this.invert = invert; 23 | this.sepia = sepia; 24 | }; 25 | 26 | /** 27 | * 28 | * @param {string} item 29 | * @returns 30 | */ 31 | setUserAvatar(item) { 32 | this.avatar = item; 33 | return this; 34 | }; 35 | 36 | /** 37 | * 38 | * @param {boolean} item 39 | * @returns 40 | */ 41 | setAvatarToCircle(item) { 42 | this.circle = item; 43 | return this; 44 | }; 45 | 46 | /** 47 | * 48 | * @param {boolean} item 49 | * @returns 50 | */ 51 | setBlur(item) { 52 | this.blur = item; 53 | return this; 54 | }; 55 | 56 | /** 57 | * 58 | * @param {number} item 59 | * @returns 60 | */ 61 | setBlurLevel(item) { 62 | this.level = item; 63 | return this; 64 | }; 65 | 66 | /** 67 | * 68 | * @param {boolean} item 69 | * @returns 70 | */ 71 | setGay(item) { 72 | this.gay = item; 73 | return this; 74 | }; 75 | 76 | /** 77 | * 78 | * @param {boolean} item 79 | * @returns 80 | */ 81 | setGreyscale(item) { 82 | this.greyscale = item; 83 | return this; 84 | }; 85 | 86 | /** 87 | * 88 | * @param {boolean} item 89 | * @returns 90 | */ 91 | setInvert(item) { 92 | this.invert = item; 93 | return this; 94 | }; 95 | 96 | /** 97 | * 98 | * @param {boolean} item 99 | * @returns 100 | */ 101 | setSepia(item) { 102 | this.sepia = item; 103 | return this; 104 | }; 105 | 106 | /** 107 | * @returns 108 | */ 109 | async generate() { 110 | try { 111 | if (this.gay) { 112 | // Add value to canvas 113 | const canvas = createCanvas(480, 480); 114 | const ctx = canvas.getContext("2d"); 115 | 116 | // Load background 117 | let background = await jimp.read(await fs.readFile("./src/storage/images/gay.png")); 118 | background = await background.getBufferAsync("image/png"); 119 | background = await loadImage(background); 120 | 121 | // Load avatar 122 | let avatar = await jimp.read(this.avatar); 123 | if (this.circle) avatar.circle(); 124 | 125 | avatar = await avatar.getBufferAsync("image/png"); 126 | avatar = await loadImage(avatar); 127 | ctx.drawImage(avatar, 0, 0, canvas.width, canvas.height); 128 | 129 | // Add gay filter 130 | ctx.drawImage(background, 0, 0, canvas.width, canvas.height); 131 | 132 | const buffer = canvas.toBuffer("image/png"); 133 | return Buffer.from(buffer); 134 | }; 135 | 136 | // Load avatar 137 | let avatar = await jimp.read(this.avatar); 138 | if (this.circle) avatar.circle(); 139 | 140 | if (this.blur) avatar.blur(isNaN(this.level) ? 5 : parseInt(this.level)); 141 | 142 | if (this.greyscale) avatar.greyscale(); 143 | 144 | if (this.invert) avatar.invert(); 145 | 146 | if (this.sepia) avatar.sepia(); 147 | 148 | const buffer = await avatar.getBufferAsync("image/png"); 149 | return Buffer.from(buffer); 150 | } catch (e) { 151 | error(e) 152 | }; 153 | } 154 | }; 155 | /** 156 | * @copyright 157 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 158 | * @copyright 159 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 160 | * @copyright 161 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 162 | * @copyright 163 | */ -------------------------------------------------------------------------------- /src/functions/generators/generateWelcomeImage.js: -------------------------------------------------------------------------------- 1 | const { 2 | createCanvas, 3 | GlobalFonts, 4 | Image, 5 | loadImage 6 | } = require("@napi-rs/canvas"); 7 | const { 8 | request 9 | } = require("undici"); 10 | const fs = require("fs/promises"); 11 | const jimp = require("jimp"); 12 | const error = require("../error"); 13 | module.exports = class { 14 | 15 | /** 16 | * 17 | * @param {{ backGround: string, userAvatar: string, userName: string, memberCount: number, circle: boolean }} 18 | * @returns 19 | */ 20 | constructor({ backGround, userAvatar, userName, memberCount, circle = true } = {}) { 21 | this.background = backGround; 22 | this.username = userName; 23 | this.membercount = memberCount; 24 | this.avatar = userAvatar; 25 | this.circle = circle; 26 | }; 27 | 28 | /** 29 | * 30 | * @param {string} item 31 | * @returns 32 | */ 33 | setBackGround(item) { 34 | this.background = item; 35 | return this; 36 | }; 37 | 38 | /** 39 | * 40 | * @param {string} item 41 | * @returns 42 | */ 43 | setUserName(item) { 44 | this.username = item; 45 | return this; 46 | }; 47 | 48 | /** 49 | * 50 | * @param {number} item 51 | * @returns 52 | */ 53 | setMemberCount(item) { 54 | this.membercount = item; 55 | return this; 56 | }; 57 | 58 | /** 59 | * 60 | * @param {string} item 61 | * @returns 62 | */ 63 | setUserAvatar(item) { 64 | this.avatar = item; 65 | return this; 66 | }; 67 | 68 | /** 69 | * 70 | * @param {boolean} item 71 | * @returns 72 | */ 73 | setAvatarToCircle(item) { 74 | this.circle = item; 75 | return this; 76 | }; 77 | 78 | /** 79 | * 80 | * @param {import("@napi-rs/canvas").Canvas} canvas 81 | * @param {string} text 82 | * @param {number} size 83 | * @param {string} font 84 | * @returns 85 | */ 86 | #applyText(canvas, text, size, font) { 87 | const ctx = canvas.getContext("2d"); 88 | do { 89 | ctx.font = `${size -= 4}px ${font}`; 90 | } while (ctx.measureText(text).width > canvas.width - 300); 91 | return ctx.font; 92 | }; 93 | 94 | /** 95 | * @returns 96 | */ 97 | async generate() { 98 | try { 99 | 100 | // Set font family 101 | GlobalFonts.registerFromPath("./src/storage/fonts/Gagalin-Regular.otf", "Gagalin"); 102 | 103 | 104 | // Add value to canvas 105 | const canvas = createCanvas(700, 250); 106 | const ctx = canvas.getContext("2d"); 107 | 108 | // Load background 109 | let background = await jimp.read(this.background); 110 | background = await background.getBufferAsync("image/png"); 111 | background = await loadImage(background); 112 | ctx.drawImage(background, 0, 0, canvas.width, canvas.height); 113 | 114 | // Load Strock 115 | ctx.strokeStyle = "#0099ff"; 116 | ctx.strokeRect(0, 0, canvas.width, canvas.height); 117 | 118 | // Load avatar 119 | let avatar = await jimp.read(this.avatar); 120 | if (this.circle) avatar.circle(); 121 | 122 | avatar = await avatar.getBufferAsync("image/png"); 123 | avatar = await loadImage(avatar); 124 | ctx.drawImage(avatar, 26, 37, 160, 160); 125 | 126 | // Username 127 | ctx.font = this.#applyText(canvas, this.username, 45, "Gagalin"); 128 | ctx.fillStyle = "#ffffff"; 129 | ctx.textAlign = "left"; 130 | ctx.fillText(this.username, 225, 187); 131 | 132 | // Welcome text 133 | ctx.fillStyle = "#ffffff"; 134 | ctx.font = "35px Gagalin"; 135 | ctx.textAlign = "left"; 136 | ctx.fillText("Welcome To Our Server", 235, 90); 137 | 138 | // Member Count text 139 | const ctn = `# ${this.membercount.toLocaleString()}th Member!!`; 140 | ctx.fillStyle = "#ffffff"; 141 | ctx.font = this.#applyText(canvas, ctn, 20, "Gagalin"); 142 | ctx.textAlign = "left"; 143 | ctx.fillText(ctn, 36, 230); 144 | 145 | const buffer = canvas.toBuffer("image/png"); 146 | return Buffer.from(buffer); 147 | } catch (e) { 148 | error(e) 149 | }; 150 | } 151 | }; 152 | /** 153 | * @copyright 154 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 155 | * @copyright 156 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 157 | * @copyright 158 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 159 | * @copyright 160 | */ -------------------------------------------------------------------------------- /src/functions/getDataFromNeko.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const error = require("./error"); 3 | 4 | /** 5 | * 6 | * @param {string} type 7 | * @returns 8 | */ 9 | module.exports = async function (type) { 10 | try { 11 | return await axios.get(`https://nekobot.xyz/api/image?type=${type}`, { 12 | headers: { 13 | Authorization: "Basic MDE1NDQ1NTM1NDU0NDU1MzU0RDY6" 14 | } 15 | }).then((res) => res.data); 16 | } catch (e) { 17 | error(e) 18 | } 19 | } 20 | /** 21 | * @copyright 22 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 23 | * @copyright 24 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 25 | * @copyright 26 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 27 | * @copyright 28 | */ -------------------------------------------------------------------------------- /src/functions/getRange.js: -------------------------------------------------------------------------------- 1 | const error = require("./error"); 2 | 3 | /** 4 | * 5 | * @param {number} number 6 | * @returns {string} 7 | */ 8 | module.exports = function (number) { 9 | try { 10 | let point; 11 | if (Number(number) > 1) point = "[(1/10) ▰](https://dsc.gg/persian-caesar)▱▱▱▱▱▱▱▱▱"; 12 | 13 | if (Number(number) > 9) point = "[(2/10) ▰▰](https://dsc.gg/persian-caesar)▱▱▱▱▱▱▱▱"; 14 | 15 | if (Number(number) > 19) point = "[(3/10) ▰▰▰](https://dsc.gg/persian-caesar)▱▱▱▱▱▱▱"; 16 | 17 | if (Number(number) > 29) point = "[(4/10) ▰▰▰▰](https://dsc.gg/persian-caesar)▱▱▱▱▱▱"; 18 | 19 | if (Number(number) > 39) point = "[(5/10) ▰▰▰▰▰](https://dsc.gg/persian-caesar)▱▱▱▱▱"; 20 | 21 | if (Number(number) > 49) point = "[(6/10) ▰▰▰▰▰▰](https://dsc.gg/persian-caesar)▱▱▱▱"; 22 | 23 | if (Number(number) > 59) point = "[(7/10) ▰▰▰▰▰▰▰](https://dsc.gg/persian-caesar)▱▱▱"; 24 | 25 | if (Number(number) > 69) point = "[(8/10) ▰▰▰▰▰▰▰▰](https://dsc.gg/persian-caesar)▱▱"; 26 | 27 | if (Number(number) > 79) point = "[(9/10) ▰▰▰▰▰▰▰▰▰](https://dsc.gg/persian-caesar)▱"; 28 | 29 | if (Number(number) > 89) point = "[(10/10) ▰▰▰▰▰▰▰▰▰▰](https://dsc.gg/persian-caesar)"; 30 | 31 | return point; 32 | } catch (e) { 33 | error(e) 34 | } 35 | } 36 | /** 37 | * @copyright 38 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 39 | * @copyright 40 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 41 | * @copyright 42 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 43 | * @copyright 44 | */ -------------------------------------------------------------------------------- /src/functions/getUserData.js: -------------------------------------------------------------------------------- 1 | const axios = require("axios"); 2 | const error = require("./error"); 3 | 4 | /** 5 | * 6 | * @param {string} userId 7 | * @param {string} botToken 8 | * @returns 9 | */ 10 | module.exports = async function (userId, botToken) { 11 | try { 12 | return await axios.get(`https://discord.com/api/users/${userId}`, { 13 | headers: { 14 | Authorization: `Bot ${botToken}`, 15 | } 16 | }).then((res) => res.data); 17 | } catch (e) { 18 | error(e) 19 | } 20 | } 21 | /** 22 | * @copyright 23 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 24 | * @copyright 25 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 26 | * @copyright 27 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 28 | * @copyright 29 | */ -------------------------------------------------------------------------------- /src/functions/loadCommand.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const error = require("./error"); 3 | const post = require("./post"); 4 | const firstUpperCase = require("./firstUpperCase"); 5 | 6 | /** 7 | * 8 | * @param {string} dirname folder of commands path 9 | * @param {string} type place only_slash or only_message 10 | * @param {Map} object commands object like client.commands 11 | * @returns {void} 12 | */ 13 | module.exports = async function (dirname, type, object) { 14 | try { 15 | fs.readdirSync(`${dirname}`).forEach(async dirs => { 16 | const commandFiles = fs.readdirSync(`${dirname}/${dirs}`).filter(files => files.endsWith(".js")); 17 | for (const file of commandFiles) { 18 | const command = require(`${dirname}/${dirs}/${file}`); 19 | if (command[type]) { 20 | object.set(command.name, command); 21 | } else { 22 | post(`${firstUpperCase(type.replace("only_", ""))} Command Not Loaded: ${file}`, "E", "red", "redBright"); 23 | continue; 24 | } 25 | }; 26 | }); 27 | } catch (e) { 28 | error(e) 29 | } 30 | } 31 | /** 32 | * @copyright 33 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 34 | * @copyright 35 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 36 | * @copyright 37 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 38 | * @copyright 39 | */ -------------------------------------------------------------------------------- /src/functions/logger.js: -------------------------------------------------------------------------------- 1 | const clc = require("cli-color"); 2 | const error = require("./error"); 3 | 4 | /** 5 | * 6 | * @param {any} data 7 | * @returns 8 | */ 9 | module.exports = function (data) { 10 | try { 11 | let logstring = `${clc.yellowBright(`[G]〢┃ ${clc.greenBright("Perisan Caesar")}`)}${clc.magenta(` 〢 `)}` 12 | if (typeof data == "string") { 13 | console.log(logstring + data.split("\n").map(d => clc.green(`${d}`)).join(`\n${logstring}`)); 14 | } else if (typeof data == "object") { 15 | console.log(logstring + clc.green(JSON.stringify(data, null, 3))); 16 | } else if (typeof data == "boolean") { 17 | console.log(logstring + clc.cyan(data)); 18 | } else { 19 | console.log(logstring + data); 20 | } 21 | } catch (e) { 22 | error(e) 23 | } 24 | } 25 | /** 26 | * @copyright 27 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 28 | * @copyright 29 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 30 | * @copyright 31 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 32 | * @copyright 33 | */ -------------------------------------------------------------------------------- /src/functions/playerDescription.js: -------------------------------------------------------------------------------- 1 | const error = require("./error"); 2 | const { QueueRepeatMode } = require("discord-player"); 3 | 4 | /** 5 | * 6 | * @param {import("discord-player").GuildQueue} queue 7 | * @returns {string} 8 | */ 9 | module.exports = async function (queue) { 10 | try { 11 | const volume = queue.node.volume || ""; 12 | const isShuffle = queue.isShuffling ? "Yes" : "No"; 13 | let loop = ""; 14 | if (queue.repeatMode === QueueRepeatMode.QUEUE) 15 | loop = "QUEUE"; 16 | 17 | else if (queue.repeatMode === QueueRepeatMode.TRACK) 18 | loop = "TRACK"; 19 | 20 | else 21 | loop = "OFF"; 22 | 23 | let bar = ""; 24 | try { 25 | bar = `\n\n${queue.node.createProgressBar()}`; 26 | } catch { 27 | } 28 | return `**Volume: ${volume}%\nShuffle: ${isShuffle}\nLoop: ${loop}${bar}**`; 29 | } catch (e) { 30 | error(e) 31 | } 32 | } 33 | /** 34 | * @copyright 35 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 36 | * @copyright 37 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 38 | * @copyright 39 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 40 | * @copyright 41 | */ -------------------------------------------------------------------------------- /src/functions/post.js: -------------------------------------------------------------------------------- 1 | const clc = require("cli-color"); 2 | 3 | /** 4 | * 5 | * @param {any} data 6 | * @param {string} name 7 | * @param {string} color1 8 | * @param {string} color2 9 | * @returns 10 | */ 11 | module.exports = function (data, name, color1, color2) { 12 | try { 13 | let dataColor = color1 || "yellowBright"; 14 | let textColor = color2 || "greenBright"; 15 | let message = `${clc[dataColor](`[${name || "U"}]〢┃ `)}`; 16 | if (typeof data == "string") { 17 | console.log(message + data.split("\n").map(d => clc.green(`${clc[textColor](`${d}`)}`)).join(`\n${message}`)) 18 | } else if (typeof data == "object") { 19 | console.log(message + clc.green(JSON.stringify(clc[textColor](`${data}`), null, 3))) 20 | } else if (typeof data == "boolean") { 21 | console.log(message + clc.cyan(clc[textColor](`${data}`))); 22 | } else { 23 | console.log(message + clc[textColor](`${data}`)); 24 | }; 25 | } catch (e) { 26 | error(e) 27 | } 28 | } 29 | /** 30 | * @copyright 31 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 32 | * @copyright 33 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 34 | * @copyright 35 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 36 | * @copyright 37 | */ -------------------------------------------------------------------------------- /src/functions/response.js: -------------------------------------------------------------------------------- 1 | const error = require("./error"); 2 | 3 | /** 4 | * 5 | * @param {import("discord.js").CommandInteraction} interaction 6 | * @param {import("discord.js").BaseMessageOptions} data 7 | * @returns {import("discord.js").InteractionResponse} 8 | */ 9 | module.exports = async function response(interaction, data) { 10 | try { 11 | if (interaction.user) { 12 | return await interaction.editReply(data); 13 | } else { 14 | return await interaction.reply(data); 15 | }; 16 | } catch (e) { 17 | error(e) 18 | } 19 | } 20 | /** 21 | * @copyright 22 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 23 | * @copyright 24 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 25 | * @copyright 26 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 27 | * @copyright 28 | */ -------------------------------------------------------------------------------- /src/handlers/1-database.js: -------------------------------------------------------------------------------- 1 | const { 2 | QuickDB 3 | } = require("quick.db"); 4 | const clc = require("cli-color"); 5 | const error = require("../functions/error"); 6 | const post = require("../functions/post"); 7 | const database = (require("../../config")).source.database; 8 | 9 | /** 10 | * 11 | * @param {import("discord.js").Client} client 12 | * @returns {void} 13 | */ 14 | module.exports = async (client) => { 15 | try { 16 | switch (database.type) { 17 | case "sql": { 18 | const { 19 | SqliteDriver 20 | } = require("quick.db"); 21 | driver = new SqliteDriver(); 22 | } break; 23 | 24 | case "mysql": { 25 | const { 26 | MySQLDriver 27 | } = require("quick.db"); 28 | driver = new MySQLDriver(database.mysql) 29 | } break; 30 | 31 | case "json": { 32 | const { 33 | JSONDriver 34 | } = require("quick.db"); 35 | driver = new JSONDriver(); 36 | } break; 37 | 38 | case "mongodb": { 39 | const { 40 | MongoDriver 41 | } = require("quickmongo"); 42 | driver = new MongoDriver(database.mongoURL); 43 | await driver.connect(); 44 | } break; 45 | }; 46 | 47 | const db = new QuickDB({ 48 | driver 49 | }); 50 | await db.init(); 51 | client.db = db; 52 | post(`Database Is Successfully Connected!! (Type: ${database.type.toLocaleUpperCase()})`, "S") 53 | } catch (e) { 54 | post(`${clc.red(`Database Doesn't Connected!! (Type: ${database.type.toLocaleUpperCase()})`)}`, "E", "red", "redBright") 55 | error(e) 56 | } 57 | } 58 | /** 59 | * @copyright 60 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 61 | * @copyright 62 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 63 | * @copyright 64 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 65 | * @copyright 66 | */ -------------------------------------------------------------------------------- /src/handlers/2-commandHandler.js: -------------------------------------------------------------------------------- 1 | const clc = require("cli-color"); 2 | const post = require("../functions/post"); 3 | const loadCommand = require("../functions/loadCommand"); 4 | const firstUpperCase = require("../functions/firstUpperCase"); 5 | 6 | /** 7 | * 8 | * @param {import("discord.js").Client} client 9 | * @returns {void} 10 | */ 11 | module.exports = async (client) => { 12 | ["only_message", "only_slash"].forEach((type) => { 13 | loadCommand(`${process.cwd()}/src/commands`, type, client.commands); 14 | post(`${clc.cyanBright(client.commands.filter(a => a[type]).size)} ${firstUpperCase(type.replace("only_", ""))} Commands Is Loaded!!`, "S"); 15 | }); 16 | }; 17 | /** 18 | * @copyright 19 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 20 | * @copyright 21 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 22 | * @copyright 23 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 24 | * @copyright 25 | */ -------------------------------------------------------------------------------- /src/handlers/3-eventsHandler.js: -------------------------------------------------------------------------------- 1 | const { useMainPlayer } = require("discord-player"); 2 | const fs = require("fs"); 3 | const clc = require("cli-color"); 4 | const post = require("../functions/post"); 5 | 6 | /** 7 | * 8 | * @param {import("discord.js").Client} client 9 | * @returns {void} 10 | */ 11 | module.exports = async (client) => { 12 | let amount = 0; 13 | fs.readdirSync(`${process.cwd()}/src/events`).forEach(dirs => { 14 | const events = fs.readdirSync(`${process.cwd()}/src/events/${dirs}`).filter(files => files.endsWith(".js")); 15 | for (const file of events) { 16 | const event = require(`${process.cwd()}/src/events/${dirs}/${file}`); 17 | if (dirs === "player") { 18 | const player = useMainPlayer(); 19 | player.events.on(file.split(".")[0], event.bind(null, client)); 20 | continue; 21 | }; 22 | 23 | client.on(file.split(".")[0], event.bind(null, client)); 24 | amount++; 25 | }; 26 | }); 27 | post(`${clc.cyanBright(amount)} Events Is Loaded!!`, "S", "yellowBright", "greenBright"); 28 | } 29 | /** 30 | * @copyright 31 | * Coded by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA 32 | * @copyright 33 | * Work for Persian Caesar | https://dsc.gg/persian-caesar 34 | * @copyright 35 | * Please Mention Us "Persian Caesar", When Have Problem With Using This Code! 36 | * @copyright 37 | */ -------------------------------------------------------------------------------- /src/storage/copyRight.json: -------------------------------------------------------------------------------- 1 | { 2 | "footerIcon": "https://cdn.discordapp.com/avatars/865630940361785345/d0c85fbbdb0ee9f105336a041904e7d8.png?size=4096", 3 | "footerText": "©️ Created by Sobhan-SRZA (mr.sinre) - Persian Caesar 🎩" 4 | } -------------------------------------------------------------------------------- /src/storage/economy.json: -------------------------------------------------------------------------------- 1 | { 2 | "work": { 3 | "1": 400, 4 | "2": 600, 5 | "3": 800, 6 | "4": 1000, 7 | "5": 1200, 8 | "6": 1400, 9 | "7": 1600, 10 | "8": 1800, 11 | "9": 2000, 12 | "10": 2200 13 | }, 14 | "home": { 15 | "1": 6000, 16 | "2": 7000, 17 | "3": 8000, 18 | "4": 9000, 19 | "5": 10000, 20 | "6": 11000, 21 | "7": 12000, 22 | "8": 13000, 23 | "9": 14000, 24 | "10": 15000 25 | }, 26 | "rob": { 27 | "1": 200, 28 | "2": 400, 29 | "3": 600, 30 | "4": 800, 31 | "5": 1000 32 | }, 33 | "miner": { 34 | "1": 500, 35 | "2": 1000, 36 | "3": 1500, 37 | "4": 2000, 38 | "5": 2500, 39 | "6": 3000, 40 | "7": 3500, 41 | "8": 4000, 42 | "9": 4500, 43 | "10": 5000 44 | }, 45 | "default_coin": 100, 46 | "miner_price": 5000, 47 | "rob_price": 3000, 48 | "work_price": 2000 49 | } -------------------------------------------------------------------------------- /src/storage/eightBall.json: -------------------------------------------------------------------------------- 1 | [ 2 | "بله کاملا", 3 | "حق با شماست", 4 | "حق با اوست", 5 | "نه اصلا", 6 | "بله", 7 | "اونجوری ک دارم میبنم بله", 8 | "اونجوری ک دارم میبنم نه", 9 | "شاید", 10 | "Yes.", 11 | "قطعا", 12 | "بعداً دوباره بپرس.", 13 | "بهتره الان بهت نگم.", 14 | "در حال حاضر نمی توان پیش بینی کرد.", 15 | "تمرکز کنید و دوباره بپرسید.", 16 | "روی آن حساب نکن.", 17 | "پاسخ من خیر است.", 18 | "منابع من می گویند نه.", 19 | "چشم انداز چندان خوب نیست.", 20 | "بسیار مشکوک.", 21 | "به هیچ وجه.", 22 | "شاید", 23 | "پاسخ درون تو پنهان شده است", 24 | "نه.", 25 | "بستگی به خلق و خوی خدای CS دارد", 26 | "||نه||", 27 | "||بله||", 28 | "صبر کن", 29 | "تمام شد", 30 | "این تازه آغاز است", 31 | "موفق باشید" 32 | ] -------------------------------------------------------------------------------- /src/storage/emotes.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /src/storage/fonts/Gagalin-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/fonts/Gagalin-Regular.otf -------------------------------------------------------------------------------- /src/storage/images/ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/ad.png -------------------------------------------------------------------------------- /src/storage/images/affect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/affect.png -------------------------------------------------------------------------------- /src/storage/images/batslap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/batslap.png -------------------------------------------------------------------------------- /src/storage/images/beautiful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/beautiful.png -------------------------------------------------------------------------------- /src/storage/images/bed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/bed.png -------------------------------------------------------------------------------- /src/storage/images/bobross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/bobross.png -------------------------------------------------------------------------------- /src/storage/images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/delete.png -------------------------------------------------------------------------------- /src/storage/images/discordblack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/discordblack.png -------------------------------------------------------------------------------- /src/storage/images/discordblue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/discordblue.png -------------------------------------------------------------------------------- /src/storage/images/doublestonk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/doublestonk.png -------------------------------------------------------------------------------- /src/storage/images/facepalm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/facepalm.png -------------------------------------------------------------------------------- /src/storage/images/gay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/gay.png -------------------------------------------------------------------------------- /src/storage/images/spank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/spank.png -------------------------------------------------------------------------------- /src/storage/images/stonk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/stonk.png -------------------------------------------------------------------------------- /src/storage/images/tatoo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/tatoo.png -------------------------------------------------------------------------------- /src/storage/images/thomas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/thomas.png -------------------------------------------------------------------------------- /src/storage/images/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/trash.png -------------------------------------------------------------------------------- /src/storage/images/wanted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/wanted.png -------------------------------------------------------------------------------- /src/storage/images/welcomeImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Persian-Caesar/All-For-One-Bot/552f9d4d58d4a46429f4d5ead96d96bf352c1cfa/src/storage/images/welcomeImage.png -------------------------------------------------------------------------------- /src/storage/nsfw/databaseTypes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "anal", 3 | "asian", 4 | "ass", 5 | "bdsm", 6 | "black", 7 | "blowjob", 8 | "boobs", 9 | "cosplay", 10 | "cum", 11 | "facesitting", 12 | "family", 13 | "gay", 14 | "hardcore", 15 | "hentai", 16 | "iranian", 17 | "lesbian", 18 | "milf", 19 | "pov", 20 | "public", 21 | "random", 22 | "solo", 23 | "squirt", 24 | "teen", 25 | "tiktok", 26 | "toys", 27 | "transgender" 28 | ] -------------------------------------------------------------------------------- /src/storage/nsfw/family.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://cdn.discordapp.com/attachments/998331825426546755/1023491974692601866/SexHouseAmator6.mp4", 3 | "https://cdn.discordapp.com/attachments/826202644888158218/826672572594389031/video0-17.mp4", 4 | "https://cdn.discordapp.com/attachments/979103092266123264/1021218299532550174/FUCKING_my_stepSISTERs_SLUTTY_holes_MP4_High_Quality.mp4", 5 | "https://cdn.discordapp.com/attachments/979103092266123264/1024463797924147260/video-1660387035.mp4", 6 | "https://cdn.discordapp.com/attachments/861528923535704074/918243489639186432/LinenUncomfortablePika-mobile.mp4", 7 | "https://video.twimg.com/amplify_video/1536459588534403075/vid/1280x692/MU1YHtyCVRttxzi-.mp4?tag=14", 8 | "https://cdn.discordapp.com/attachments/912913817229471764/914155977178251274/xkXxaVXevoI_GiQL.mp4", 9 | "https://cdn.discordapp.com/attachments/912913792982192168/914140079465832468/porn_16.mp4", 10 | "https://cdn.discordapp.com/attachments/912913792982192168/914140352653459526/1231231.mp4", 11 | "https://cdn.discordapp.com/attachments/912913817229471764/917937655864500234/VID_20211130_161317_905.mp4", 12 | "https://cdn.discordapp.com/attachments/912913810606661632/914146348771721236/xvideos.com_e0cbe1711afa14c7199d8c9fd296970a.mp4", 13 | "https://cdn.discordapp.com/attachments/912913810606661632/914146347937050634/xvideos.com_f3fa79f2c99e3fd9bad2df2f775df1e1-1.mp4", 14 | "https://cdn.discordapp.com/attachments/944668553439760434/1048338292107657286/trim.316EA845-C41E-427C-B2DA-697CA8B015E8.mov", 15 | "https://cdn.discordapp.com/attachments/715597787420426260/792249882420314112/Step_dad_and_daughters_family_threesome_sex.mp4", 16 | "https://cdn.discordapp.com/attachments/715597787420426260/827332511758680114/Step-Sis_Caught_Masturbating_During_Yoga_Session.mp4", 17 | "https://cdn.discordapp.com/attachments/912913810606661632/914146225098469397/xvideos.com_b6bc62375676c51cd68b8c0b523efc19.mp4", 18 | "https://cdn.discordapp.com/attachments/912913810606661632/914146181007962182/xvideos.com_7c8e1f56c2d567b97e136f4ccd57290b-1.mp4", 19 | "https://cdn.discordapp.com/attachments/912913810606661632/914146185990795304/xvideos.com_71ef12f74aa36d3bcccb25deaf3cb292.mp4", 20 | "https://cdn.discordapp.com/attachments/912913810606661632/914146293453037609/xvideos.com_d8b3c99880f20707d4a22c719e70610f-1.mp4" 21 | ] -------------------------------------------------------------------------------- /src/storage/nsfw/hannah-owo.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://media.discordapp.net/attachments/953041973831430184/953361960844550234/949026325761519666.jpg", 3 | "https://media.discordapp.net/attachments/953041973831430184/953361960563507250/949026325484675092.jpg", 4 | "https://media.discordapp.net/attachments/953041973831430184/953361960332836864/949026325274972251.jpg", 5 | "https://media.discordapp.net/attachments/953041973831430184/953361960060219403/949026324981375057.jpg", 6 | "https://media.discordapp.net/attachments/953041973831430184/953361959754014720/949026338524790914.jpg", 7 | "https://cdn.discordapp.com/attachments/953041973831430184/953362011050356786/949026481839951932.mp4", 8 | "https://media.discordapp.net/attachments/953041973831430184/953361970936053830/949026480002834452.jpg", 9 | "https://media.discordapp.net/attachments/953041973831430184/953361970646614067/949026340554813491.jpg", 10 | "https://media.discordapp.net/attachments/953041973831430184/953361970382377000/949026340194091028.jpg", 11 | "https://media.discordapp.net/attachments/953041973831430184/953361970034257981/949026338919047178.jpg", 12 | "https://media.discordapp.net/attachments/953041973831430184/953361969774206976/949026481298894858.jpg", 13 | "https://cdn.discordapp.com/attachments/1015916383193800746/1096362365798334536/Hannah_Owo_Sex_Tape_Hotel_PPV_Video_Leaked_-_DirtyShip.com.vd.default.mp4", 14 | "https://cdn.discordapp.com/attachments/1015916383193800746/1096360357708177499/vid_480p.mp4", 15 | "https://media.discordapp.net/attachments/953041973831430184/953361971430953011/949026480942350366.jpg", 16 | "https://media.discordapp.net/attachments/953041973831430184/953361971187691530/949026480640385044.jpg", 17 | "https://cdn.discordapp.com/attachments/923247935402156073/1011716736518733834/Hannah_Owo_Sex_Tape_Hotel_PPV_Video_Leaked_-_DirtyShip.com.vd.default.mp4" 18 | ] -------------------------------------------------------------------------------- /src/storage/nsfw/nekoApiTypes.json: -------------------------------------------------------------------------------- 1 | [ 2 | "ass", 3 | "thigh", 4 | "boobs", 5 | "pussy", 6 | "feet", 7 | "anal", 8 | "blowjob", 9 | "4k" 10 | ] -------------------------------------------------------------------------------- /src/storage/nsfw/public.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://cdn.discordapp.com/attachments/686780791191109636/1103695220576624760/AaE59uN.mp4", 3 | "https://cdn.discordapp.com/attachments/686780791191109636/1098063026000769054/9569b0f1-0b31-4c88-b7a1-7a7a92a8e0ac.mp4", 4 | "https://cdn.discordapp.com/attachments/686780791191109636/1099427411973636106/PrizeThankfulIberianemeraldlizard-mobile.mp4", 5 | "https://cdn.discordapp.com/attachments/686780791191109636/1096448967400763433/Brazzers_discord_2.mp4", 6 | "https://cdn.discordapp.com/attachments/686780791191109636/1096449297135976518/SexHouse_Public38.mp4", 7 | "https://cdn.discordapp.com/attachments/686780791191109636/1100053162573967510/DarkmagentaPowerfulNatterjacktoad.mp4", 8 | "https://cdn.discordapp.com/attachments/849299698618597407/904861499141529610/m2RsSMEb1.gif", 9 | "https://cdn.discordapp.com/attachments/849299698618597407/895709704678944788/thumb1.png", 10 | "https://cdn.discordapp.com/attachments/849299698618597407/877419724647043072/WorthlessSlushyPanther-mobile.mp4", 11 | "https://cdn.discordapp.com/attachments/849299698618597407/881234746108182569/unknown.png", 12 | "https://media.discordapp.net/attachments/971503829298327582/972589868360282172/1507207462381752323264P.mp4", 13 | "https://cdn.discordapp.com/attachments/686780791191109636/1103340515652534442/AlarmingJubilantDogwoodclubgall.mp4", 14 | "https://cdn.discordapp.com/attachments/849299698618597407/904857822091694150/porn-gifs-porn--public-porn-6928756.gif", 15 | "https://cdn.discordapp.com/attachments/686780791191109636/1107115148746952734/50743652_003_6f91.jpg", 16 | "https://media.discordapp.net/attachments/511257077797093426/1096822617706614875/trim.80189D2E-112E-4BBE-AF0D-013B7A04BEA4.mp4", 17 | "https://bobsvagene.club/wp-content/uploads/2018/06/public_disg-1389.gif", 18 | "https://cdn.discordapp.com/attachments/849299698618597407/895709600077197392/26367_screen.png", 19 | "https://cdn.discordapp.com/attachments/686780791191109636/1096449014574100511/E5S8mIo.mp4", 20 | "https://cdn.discordapp.com/attachments/686780791191109636/1110581129959985313/1048674278.jpg", 21 | "https://cdn.discordapp.com/attachments/686780791191109636/1096449151903993947/SexHouse_Public57.mp4", 22 | "https://cdn.discordapp.com/attachments/430335914040885258/1106764273696378950/RDT_20230512_204931.mp4", 23 | "https://media.discordapp.net/attachments/971503829298327582/972589697371103302/VID_20220324_010017_168.mp4", 24 | "https://media.discordapp.net/attachments/838038184290025512/844223730728960020/image0.gif", 25 | "https://cdn.discordapp.com/attachments/763851444910293022/1085581242352812132/VID_20230315_225904_420.mp4", 26 | "https://cdn.discordapp.com/attachments/980064220743868466/1002319133662269460/1658138907280122.mp4", 27 | "https://redgifs.com/watch/trustworthysalmonshelduck", 28 | "https://cdn.discordapp.com/attachments/849299698618597407/895710488648876072/meaAaGwObaaaamh7O5PRKR7iBgIaWoN9.png", 29 | "https://cdn.discordapp.com/attachments/849299698618597407/990095293993353226/165089625761.mp4", 30 | "https://cdn.discordapp.com/attachments/849299698618597407/895711242675703818/19ddc61af8f213d2c43c17204efab297.png", 31 | "https://cdn.discordapp.com/attachments/686780791191109636/1115172688714014810/Public_Pickups_-_Rihanna.mp4", 32 | "https://cdn.discordapp.com/attachments/1004853584883622028/1020342448842621020/discord.ggssex_43.mov" 33 | ] -------------------------------------------------------------------------------- /src/storage/nsfw/transgender.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099358971292291133/Video.mov", 3 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359004708315176/09.mp4", 4 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359018381738146/trim.E0894FE8-2825-4DDD-A18A-18065F5A4305.mov", 5 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359027634376755/VID_20230304_171232_347.mov", 6 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359157989163089/P-Tsgv7VhTdaLVNj.mov", 7 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359018381738146/trim.E0894FE8-2825-4DDD-A18A-18065F5A4305.mov", 8 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099359004708315176/09.mp4", 9 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099358985527771156/BNVXnAC.mov", 10 | "https://cdn.discordapp.com/attachments/1099073837171212321/1099358971292291133/Video.mov", 11 | "https://cdn.discordapp.com/attachments/971504115836395571/972538095578775552/1608689297_looped_1608689296.mp4", 12 | "https://cdn.discordapp.com/attachments/971504115836395571/972538095989850153/WwHucu7o4ajQ5upa.mp4", 13 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248539901861958/2_5431647931532843900.mp4", 14 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248540283551804/SlimyMellowDuiker-mobile.mov", 15 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248540702978188/VID_20220828_104946_441.mp4", 16 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248541466329138/xvideos.com_278c513cb1af6e199287a6a23a5aee27.mp4", 17 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248542057742366/discord.gg_hdporn_31.mov", 18 | "https://cdn.discordapp.com/attachments/971504115836395571/1032248543064371231/iiiiiiiiii.mp4", 19 | "https://cdn.discordapp.com/attachments/797579015316832287/877854722344779866/xvideos.com_763ac5489c2a3f45d1716378ed1b3b4d.mp4", 20 | "https://media.discordapp.net/attachments/1003609614111219802/1003688149987381368/xvideos.com_44b702c27ce2d9b1a41b638497bdb511.mp4", 21 | "https://media.discordapp.net/attachments/1003609614111219802/1003688146636128256/xvideos.com_871af71cc347121aa3e1cc49fb4d79b9.mp4", 22 | "https://cdn.discordapp.com/attachments/940315852601983047/948986105829683210/1642329061536.webm", 23 | "https://cdn.discordapp.com/attachments/940315852601983047/948985322165923880/-B2GqSr3b_joox3c.mp4", 24 | "https://cdn.discordapp.com/attachments/768710092676923412/1108356317556506634/VID_20220319_101937_168.mp4", 25 | "https://cdn.discordapp.com/attachments/768710092676923412/1106352769771765803/tweeload_09cf1d4e.mp4", 26 | "https://cdn.discordapp.com/attachments/768710092676923412/1099533952219353209/1682219422939498.webm", 27 | "https://cdn.discordapp.com/attachments/768710092676923412/1098018188656119928/ssstwitter.com_1669686971783.mp4", 28 | "https://cdn.discordapp.com/attachments/1025001315316797480/1025003396647878708/xvideos.com_3638dfe89b30d1654ea315f5e592c3fc.mp4", 29 | "https://cdn.discordapp.com/attachments/768710092676923412/1090738808280076329/3a7320bd735d7242fc157d4cea953944.mp4", 30 | "https://cdn.discordapp.com/attachments/1025001315316797480/1077588443393175682/Turkish_threesome_-_1_trans_2_big_dicked_straight_guys_-_ThisVid.com.mp4", 31 | "https://cdn.discordapp.com/attachments/1047687230782718012/1051438157121466379/1614327781982.webm", 32 | "https://cdn.discordapp.com/attachments/1047687230782718012/1051438156127424512/1614705943710.webm", 33 | "https://cdn.discordapp.com/attachments/1047687230782718012/1050332786856296479/C0avoaA.mp4", 34 | "https://cdn.discordapp.com/attachments/1047687230782718012/1049843969196044378/NearGorgeousScoter-mobile.mp4", 35 | "https://cdn.discordapp.com/attachments/1047687230782718012/1048227256167837706/VID_20221103_135552_049.mp4", 36 | "https://cdn.discordapp.com/attachments/1047687230782718012/1048235990004813895/trim.8B161C73-E187-4AB7-BFCD-C98A051CE72C.mov", 37 | "https://cdn.discordapp.com/attachments/1047687230782718012/1049648860819103774/CreativeAccomplishedDiamondbackrattlesnake-mobile.mp4", 38 | "https://cdn.discordapp.com/attachments/942451362011181106/1098337921947410432/OpenFittingAlaskanhusky-mobile.mp4", 39 | "https://cdn.discordapp.com/attachments/1047687230782718012/1047841298163445770/Video.mov", 40 | "https://cdn.discordapp.com/attachments/1047687230782718012/1054483824727306310/1668650387276879.webm", 41 | "https://cdn.discordapp.com/attachments/657295543432642624/1033441057041559592/123.mp4", 42 | "https://cdn.discordapp.com/attachments/768710092676923412/1113648598064840704/1641579352976.webm", 43 | "https://cdn.discordapp.com/attachments/1025001315316797480/1077588443393175682/Turkish_threesome_-_1_trans_2_big_dicked_straight_guys_-_ThisVid.com.mp4" 44 | ] -------------------------------------------------------------------------------- /src/storage/userBadages.json: -------------------------------------------------------------------------------- 1 | { 2 | "emotes": { 3 | "Staff": "<:DiscordStaff:1212804052635746406>", 4 | "Partner": "<:PartneredServerOwner:1212804218717732875>", 5 | "Hypesquad": "<:HypeSquadEvent:1212804162555879424>", 6 | "BugHunterLevel1": "<:DiscordBugHunter1:1212804597064794173>", 7 | "BugHunterLevel2": "<:DiscordBugHunter2:1212804026471551016>", 8 | "HypeSquadOnlineHouse1": "<:HypeSquadBravery:1212804126350643220>", 9 | "HypeSquadOnlineHouse2": "<:HypeSquadBrilliance:1212804139411832842>", 10 | "HypeSquadOnlineHouse3": "<:HypeSquadBalance:1212804108722114641>", 11 | "PremiumEarlySupporter": "<:EarlySupporter:1212804086382989382>", 12 | "VerifiedBot": "<:Bot1:1212803972243660850><:Bot2:1212803983740248104>", 13 | "VerifiedDeveloper": "<:EarlyVerifiedBotDeveloper:1212804072344658051>", 14 | "CertifiedModerator": "<:ModeratorProgramsAlumni:1212804172416552991>", 15 | "ActiveDeveloper": "<:ActiveDeveloper:1212803896028954634>" 16 | }, 17 | "names": { 18 | "Staff": "Discord Staff", 19 | "Partner": "Discord Partner", 20 | "BugHunterLevel1": "Bug Hunter (Level 1)", 21 | "BugHunterLevel2": "Bug Hunter (Level 2)", 22 | "Hypesquad": "HypeSquad Events", 23 | "HypeSquadOnlineHouse1": "House of Bravery", 24 | "HypeSquadOnlineHouse2": "House of Brilliance", 25 | "HypeSquadOnlineHouse3": "House of Balance", 26 | "PremiumEarlySupporter": "Early Supporter", 27 | "TeamPseudoUser": "Team User", 28 | "VerifiedBot": "Verified Bot", 29 | "VerifiedDeveloper": "Verified Bot Developer", 30 | "ActiveDeveloper": "Active Developer" 31 | } 32 | } -------------------------------------------------------------------------------- /start.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | cls 3 | :run 4 | npm install && cls && npm start 5 | 6 | goto run --------------------------------------------------------------------------------