├── package.json ├── README.MD ├── src ├── commands │ ├── messageCommands │ │ └── ping.js │ └── interactionCommands │ │ ├── App │ │ └── avatar.js │ │ └── Slash │ │ ├── ping.js │ │ └── avatar.js ├── events │ ├── guildLeave.js │ ├── guildCreate.js │ ├── ready.js │ ├── interactionCreate.js │ └── messageCreate.js ├── settings │ └── config.json ├── handlers │ ├── interactionHandler.js │ ├── commandHandler.js │ └── eventHandler.js └── functions │ └── slashCommands.js ├── index.js └── LICENSE /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bot", 3 | "version": "1.0.0", 4 | "description": "Discord v13 Boş Altyapı", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": ["Discord","v13","V13","BOŞ", "Discord Boş Altyapı","Discord V13","Discord v13 Boş" , "Discord v13 Bos" , "Discord v13 bos altyapi"], 10 | "author": "theChain", 11 | "license": "MIT", 12 | "dependencies": { 13 | "@discordjs/rest": "^0.5.0", 14 | "chalk": "^3.0.0", 15 | "discord.js": "^13.8.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # v13 Discord Bot 2 | Selam! Size kendi yapımım olan Discord Botunu sunuyorum , v13 konusunda yeterli altyapı bulunmadıgını dusundugum icin bu altyapıyı yayınlamayı dusunudum. 3 | 4 | # Features of bot! (Commands) 5 | 6 | SlashCommands || MessageCommands || ContextMenu 7 | 8 | # İletişim 9 | 10 | Burada Discord hesabımı vermem gerek ama kendisi cok degistigi icin bir sey diyemiyorum :D 11 | ama buradan ulaşabilirsiniz sanırım 12 | 13 | discord.gg/b00ter 14 | theChain#2756 15 | 16 | # Okudugun icin teşekkür ederim 17 | 18 | Okudugun icin teşekkür ederim, süpersiniz! Eğer katkım olduysa star atabilirsiniz :) -------------------------------------------------------------------------------- /src/commands/messageCommands/ping.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | 3 | module.exports = { 4 | conf: { 5 | aliases: ["gecikme"], 6 | name: "ping", 7 | owner: true, 8 | guildOnly:true, 9 | enabled:true 10 | }, 11 | 12 | run: async (client, message, args,embed) => { 13 | 14 | message.reply({content: client.ws.ping + " Güncel pingim!"}) 15 | } 16 | }; 17 | 18 | 19 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 20 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ 21 | -------------------------------------------------------------------------------- /src/commands/interactionCommands/App/avatar.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js'); 2 | const { ContextMenuCommandBuilder } = require('@discordjs/builders'); 3 | const { ApplicationCommandType } = require('discord-api-types/v10'); 4 | 5 | module.exports = { 6 | data: new ContextMenuCommandBuilder() 7 | .setName('Avatar') 8 | .setType(ApplicationCommandType.User), 9 | 10 | async execute(interaction, client) { 11 | const user = client.users.cache.get(interaction.targetId); 12 | await interaction.reply({ content: `${user.displayAvatarURL({ dynamic: true, size: 2048 })}` }); 13 | } 14 | }; 15 | 16 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 17 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* 2 | /---/ RENK ŞEMASI /---/ ; 3 | GREEN = BAŞARILI İŞLEM 4 | RED = BAŞARISIZ İŞLEM 5 | BLUE = BİLGİ VEREN İŞLEM 6 | /---/ RENK ŞEMASI /---/ ; 7 | */ 8 | 9 | const Discord = require("discord.js") 10 | let client = (global.client = new Discord.Client({intents: [131071]})) 11 | const fs = require("fs") 12 | const settings = require("./src/settings/config.json") 13 | const chalk = require("chalk") 14 | 15 | // const buttons = require("discord-buttons") 16 | // buttons(client) 17 | 18 | let handlerFiles = fs.readdirSync(`./src/handlers/`).filter(x => x.endsWith(".js")) 19 | handlerFiles.forEach(file => { 20 | require("./src/handlers/" + file)(client,settings) 21 | }) 22 | 23 | client 24 | .login(settings.bot.token) 25 | .catch(() => console.log(chalk.red("[HATA] Bot Bağlanamadı!"))); 26 | 27 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 28 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/events/guildLeave.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | var settings = require("../settings/config.json") 3 | 4 | const client = global.client 5 | 6 | module.exports = (guild) => { 7 | 8 | const newGuildEmbed = new MessageEmbed() 9 | .setAuthor({ name: client.user.username, iconURL: client.user.avatarURL({ dynamic: true }) }) 10 | .setColor("DARK_AQUA") 11 | .setTitle(`${guild.name} sunucusundan ayrıldım!`) 12 | .setDescription(` 13 | ▫ Sunucuda ki kişi sayısı : ${guild.memberCount} 14 | `) 15 | .setFooter({ text: settings.ozellestirme.footer }) 16 | .setTimestamp() 17 | client.channels.cache.get(settings.ozellestirme.kanal.eklendiAtildi).send({ embeds: [newGuildEmbed] }) 18 | 19 | 20 | } 21 | module.exports.conf = { 22 | name: "guildDelete" 23 | } 24 | 25 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 26 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/commands/interactionCommands/Slash/ping.js: -------------------------------------------------------------------------------- 1 | const { SlashCommandBuilder, hyperlink } = require("@discordjs/builders"); 2 | const { MessageEmbed, MessageActionRow, MessageSelectMenu, IntegrationApplication , MessageButton} = require("discord.js"); 3 | const client = global.client; 4 | 5 | module.exports = { 6 | data: new SlashCommandBuilder() 7 | .setName("ping") 8 | .setDescription("Botun güncel pingini gösterir"), 9 | 10 | async execute(interaction,client){ 11 | 12 | // interaction.reply({content: `> ${ hyperlink(`efwefhwefhhg`, `https://discord.gg/ffXnybWt`)}`, ephemeral: true }) 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle("Güncel Ping") 16 | .setDescription("Güncel ping " + client.ws.ping) 17 | interaction.reply({ content:"> :ping_pong:",embeds: [embed] , ephemeral: true }) 18 | } 19 | } 20 | 21 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 22 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/settings/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "bot":{ 3 | "token":"DİSCORD BOT TOKNE", 4 | "prefix":"pREFİX", 5 | "clientID":"Client ID" 6 | }, 7 | "ozellestirme":{ 8 | "event":{ 9 | "type":"COMPETING", 10 | "events" : [ 11 | "theChain :)","theChain bot","v13 bos","github.com/theChain" 12 | ], 13 | "status":"idle" 14 | }, 15 | "cooldown":"Cooldown sistemini kurmadim eger cok begenilirse kurabilirim sonra", 16 | "footer":"theChain was here", 17 | "kanal":{ 18 | "eklendiAtildi":"Bot sunucuya eklenince mesaj attıgı kanal", 19 | "komutLog":"Komut kullanılınca mesaj atılan kanal", 20 | "connectedLog":"Botun baglanınca mesaj attıgı kanal" 21 | }, 22 | "desteksunucusu":"Botunuz public degilse burayı girmeyebilirsiniz, burasının sebebi eger slash komutlar girilmemişse uyeye mesaj attiginda destek sunucusunu da atar" 23 | }, 24 | "ekip":{ 25 | "kurucu":["Kurucu İD Giriniz"] 26 | } 27 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 theChain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/handlers/interactionHandler.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const chalk = require("chalk") 3 | const { Collection } = require("discord.js") 4 | const settings = require("../settings/config.json") 5 | const client = global.client 6 | 7 | 8 | module.exports = (client) => { 9 | 10 | client.slashcommands = new Collection(); 11 | var slashcommands = global.slashcommands = []; 12 | 13 | fs.readdirSync('./src/commands/interactionCommands').forEach(async category => { 14 | const commands = fs.readdirSync(`./src/commands/interactionCommands/${category}/`).filter(cmd => cmd.endsWith('.js')); 15 | for (const command of commands) { 16 | const Command = require(`../commands/interactionCommands/${category}/${command}`); 17 | client.slashcommands.set(Command.data.name, Command); 18 | slashcommands.push(Command.data.toJSON()); 19 | } 20 | }); 21 | } 22 | 23 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 24 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/handlers/commandHandler.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const chalk = require("chalk") 3 | const { Collection } = require("discord.js") 4 | 5 | module.exports = (client) => { 6 | 7 | client.commands = new Collection(); 8 | client.aliases = new Collection(); 9 | 10 | fs.readdir("./src/commands/messageCommands", (err , files) => { 11 | if(err) { 12 | console.log(chalk.red("[HATA] commandHandler'de bir problem yaşandı!")); 13 | console.error(err) 14 | } 15 | console.log(chalk.blue("[BİLGİ] " + files.length + " komut yükleniyor!")) 16 | files 17 | .filter(x => x.endsWith(".js")) 18 | .forEach(f => { 19 | const props = require(`../commands/messageCommands/${f}`) 20 | client.commands.set(props.conf.name, props); 21 | 22 | props.conf.aliases.forEach(alias => { 23 | client.aliases.set(alias, props.conf.name); 24 | }); 25 | console.log(chalk.green(`[BOT] ${props.conf.name} komutu yüklendi!`)) 26 | }) 27 | }) 28 | 29 | } 30 | 31 | 32 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 33 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/handlers/eventHandler.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const chalk = require("chalk") 3 | 4 | let onceEvents = ["ready"] 5 | 6 | module.exports = (client,settings,rest) => { 7 | fs.readdir("./src/events" , (err, files) => { 8 | if(err){ 9 | console.log(chalk.red("[HATA] eventHandler'de bir problem yaşandı!")); 10 | console.error(err) 11 | } 12 | console.log(chalk.blue(`[BİLGİ] ${files.length} event yükleniyor!`)) 13 | files 14 | .filter(x => x.endsWith(".js")) 15 | .forEach((file) => { 16 | let prop = require(`../events/${file}`) 17 | if(!prop.conf) console.log(chalk.red(`[HATA] ${prop} eventinde config bulunamadı!`)); 18 | if(prop.conf.name == onceEvents) { 19 | client.once(prop.conf.name , prop) 20 | } else { 21 | client.on(prop.conf.name,prop) 22 | } 23 | console.log(chalk.green("[BOT] " + file + " eventi yüklendi!")) 24 | }); 25 | }) 26 | } 27 | 28 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 29 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/events/guildCreate.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | var settings = require("../settings/config.json") 3 | 4 | const client = global.client 5 | 6 | module.exports = (guild) => { 7 | 8 | const newGuildEmbed = new MessageEmbed() 9 | .setAuthor({ name: client.user.username, iconURL: client.user.avatarURL({ dynamic: true }) }) 10 | .setColor("LIGHT_GREY") 11 | .setTitle(`${guild.name} sunucusuna katıldım!`) 12 | .setDescription(` 13 | ▫ Sunucuda ki kişi sayısı : ${guild.memberCount} 14 | `) 15 | .setFooter({ text: settings.ozellestirme.footer }) 16 | .setTimestamp() 17 | client.channels.cache.get(settings.ozellestirme.kanal.eklendiAtildi).send({ embeds: [newGuildEmbed] }) 18 | 19 | 20 | // Load slash commands 21 | let slashcommands = global.slashcommands 22 | let slashFunction = require("../functions/slashCommands") 23 | slashFunction.load(slashcommands, guild) 24 | // Load slash commands 25 | 26 | } 27 | module.exports.conf = { 28 | name: "guildCreate" 29 | } 30 | 31 | 32 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 33 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/events/ready.js: -------------------------------------------------------------------------------- 1 | const chalk = require("chalk"); 2 | var settings = require("../settings/config.json") 3 | let client = global.client 4 | const { MessageEmbed } = require("discord.js") 5 | 6 | 7 | module.exports = async(client) => { 8 | 9 | 10 | let oyunlar = settings.ozellestirme.event.events 11 | let tip = settings.ozellestirme.event.type 12 | let status = settings.ozellestirme.event.status 13 | 14 | setInterval(() => { 15 | var randomSayi = Math.floor(Math.random() * oyunlar.length) 16 | let event = oyunlar[randomSayi] 17 | client.user.setPresence({ activities: 18 | [{ 19 | name: event, 20 | type: tip 21 | }], 22 | status: status 23 | }) 24 | }, 30 * 100); 25 | 26 | // Load slash commands 27 | let slashcommands = global.slashcommands 28 | let slashFunction = require("../functions/slashCommands") 29 | client.guilds.cache.forEach(element => { 30 | slashFunction.load(slashcommands,element) 31 | }); 32 | // Load slash commands 33 | let tarih = new Date() 34 | let saat = tarih.getHours() 35 | let min = tarih.getMinutes() 36 | let sec = tarih.getSeconds() 37 | 38 | const reConnectedEmbed = new MessageEmbed() 39 | .setAuthor({name:client.user.username,iconURL:client.user.avatarURL({dynamic:true})}) 40 | .setColor("AQUA") 41 | .setTitle("Bot Tekrardan Bağlandı!") 42 | .setDescription(saat + ":" + min + ":" + sec) 43 | .setFooter({text:settings.ozellestirme.footer}) 44 | 45 | 46 | await console.log(chalk.magenta("[BOT] " + client.user.username + " ile giriş yapıldı!")) 47 | client.channels.cache.get(settings.ozellestirme.kanal.connectedLog).send({ embeds: [reConnectedEmbed] }) // Her bağlandiginda mesaj atar isterseniz kapatin 48 | } 49 | 50 | module.exports.conf = { 51 | name: "ready", 52 | }; 53 | 54 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 55 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/events/interactionCreate.js: -------------------------------------------------------------------------------- 1 | const chalk = require("chalk"); 2 | var settings = require("../settings/config.json") 3 | let slashcommands = global.slashcommands 4 | let slashFunction = require("../functions/slashCommands") 5 | let client = global.client 6 | const { MessageEmbed, Message, Collection } = require("discord.js"); 7 | 8 | 9 | module.exports = async (interaction) => { 10 | 11 | 12 | 13 | if (interaction.isContextMenu() || interaction.isCommand()) { 14 | const command = client.slashcommands.get(interaction.commandName); 15 | if (interaction.user.bot) return; 16 | if (!interaction.inGuild() && interaction.isCommand()) return interaction.editReply({ content: 'Komutları kullanmak için bir sunucuda olmanız gerekir.' }); 17 | if (!command) return interaction.reply({ content: 'Bu komut kullanılamıyor.', ephemeral: true }) && client.slashcommands.delete(interaction.commandName); 18 | 19 | const komutLogEmbedi = new MessageEmbed() 20 | .setTitle(command.data.name + " interaction'u kullanıldı") 21 | .setColor("GREEN") 22 | .setTimestamp() 23 | .setFooter({ text: settings.ozellestirme.footer }) 24 | .setDescription(` 25 | ▫ İnteraction'u Kullanan Kullanıcı : ${interaction.user.username} **(${interaction.user.id})** 26 | ▫ Kullanılan inreaction ismi : ${command.data.name} 27 | ▫ Tür : İnteraction 28 | `) 29 | 30 | try { 31 | command.execute(interaction, client); 32 | client.channels.cache.get(settings.ozellestirme.kanal.komutLog).send({ embeds: [komutLogEmbedi] }) 33 | } 34 | catch (e) { 35 | console.log(e); 36 | return interaction.reply({ content: `An error has occurred.\n\n**\`${e.message}\`**` }); 37 | } 38 | } 39 | } 40 | module.exports.conf = { 41 | name: "interactionCreate", 42 | }; 43 | 44 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 45 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/commands/interactionCommands/Slash/avatar.js: -------------------------------------------------------------------------------- 1 | const { SlashCommandBuilder, hyperlink } = require("@discordjs/builders"); 2 | const { MessageEmbed, MessageActionRow, MessageSelectMenu, IntegrationApplication } = require("discord.js"); 3 | const client = global.client; 4 | 5 | module.exports = { 6 | data: new SlashCommandBuilder() 7 | .setName("avatar") 8 | .setDescription("Kullanıcının yada sizin avatarınızı gönderir.") 9 | .addStringOption((option) => 10 | option 11 | .setName("kişi") 12 | .setDescription("Avatarına bakmak istediğiniz üyeyi belirtiniz.") 13 | ), 14 | async execute(interaction, client) { 15 | 16 | const member = interaction.options.getString('kişi') || interaction.member; 17 | if (isNaN(member)) { 18 | return interaction.reply({ content: ':x: Kullanıcı id si bir sayı olmalıdır.', ephemeral: true }); 19 | } 20 | try { 21 | await client.users.fetch(member); 22 | } catch (e) { 23 | return interaction.reply({ content: ":x: Böyle bir kullanıcı bulunamadı.", ephemeral: true }); 24 | } 25 | const fetchUser = await client.users.fetch(member); 26 | await fetchUser.fetch(); 27 | 28 | interaction.reply({ content: `> ${hyperlink(`${fetchUser.tag}`, fetchUser.displayAvatarURL({ dynamic: true, size: 4096 }))}` }) 29 | var filter = (menu) => menu.user.id === interaction.user.id; 30 | const collector = interaction.channel.createMessageComponentCollector({ filter, componentType: 'SELECT_MENU', max: 1, time: 20000 }); 31 | 32 | collector.on("collect", async (menu) => { 33 | if (menu.values[0] === "banner") { 34 | let banner = await bannerXd(fetchUser.id, client) 35 | menu.reply({ content: `> ${hyperlink(`${fetchUser.tag}`, `${banner}`)}`, ephemeral: true }) 36 | } 37 | }) 38 | 39 | } 40 | }; 41 | 42 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 43 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/functions/slashCommands.js: -------------------------------------------------------------------------------- 1 | const settings = require("../settings/config.json") 2 | const { MessageEmbed } = require("discord.js") 3 | const chalk = require("chalk") 4 | 5 | const { REST } = require('@discordjs/rest'); 6 | const { Routes } = require('discord-api-types/v10'); 7 | const rest = new REST({ version: '9' }).setToken(settings.bot.token); 8 | 9 | const slash = { 10 | load: async (commands, guild) => { 11 | const rest = new REST({ version: '9' }).setToken(settings.bot.token); 12 | (async () => { 13 | try { 14 | console.log(chalk.blue('[BOT] ' + guild.name + ' sunucusuna Slash ve Komutlar yükleniyor.')); 15 | await rest.put( 16 | Routes.applicationGuildCommands(settings.bot.clientID, guild.id), 17 | { body: commands }, 18 | ).then(() => { 19 | console.log(chalk.green('[BOT] ' + guild.name + ' sunucusuna Slash ve Context Komutlar yüklendi.')); 20 | }); 21 | } 22 | catch (e) { 23 | const guildOwner = guild.ownerId 24 | let destek = await settings.ozellestirme.desteksunucusu 25 | 26 | let hataEmbedi = new MessageEmbed() 27 | .setTitle("Merhaba değerli kullanıcımız!") 28 | .setColor("RED") 29 | .setDescription(` 30 | Botumuzu eklediğiniz zaman eğik çizgi (/) Komutları eklemeden eklemişsiniz. 31 | Bu şekil eklemediğiniz için botumuzda teknik hatalar ve sunucuda eğik çizgi (/) komutları oluşturamıyoruz 32 | Ama [Endişelenmeyin buradan bu hatayı düzeltebilirsiniz](https://discord.com/api/oauth2/authorize?client_id=990195890813808680&permissions=8&scope=bot%20applications.commands) 33 | **Bot sunucudan ayrılacaktır. Siz linkten tekrar ekleyiniz** 34 | `) 35 | .addField("Sunucunuzu seçin","Linki açtıktan sonra olduğunuz sunucuyu seçin!") 36 | .addField("Destek sunucumuz",`[Buradan ulaşabilirsiniz](${destek})`) 37 | .setFooter({text : settings.ozellestirme.footer}) 38 | .setTimestamp() 39 | await client.users.cache.get(guildOwner).send({embeds:[hataEmbedi]}).catch((e) => console.log(chalk.red(e))); 40 | await guild.leave() 41 | console.log(chalk.red('[BOT] ' + guild.name + ' sunucusuna Slash ve Context Komutlar yüklenemedi çünkü iznim yoktu!.')); 42 | } 43 | })(); 44 | }, 45 | delete: async (guild, commandID) => { 46 | 47 | } 48 | } 49 | 50 | module.exports = slash; 51 | 52 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 53 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ -------------------------------------------------------------------------------- /src/events/messageCreate.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, Message, Collection } = require("discord.js"); 2 | const settings = require("../settings/config.json") 3 | const client = global.client; 4 | const chalk = require("chalk") 5 | 6 | 7 | module.exports = async (message) => { 8 | 9 | // usenmesem cooldown :D 10 | let prefix = settings.bot.prefix 11 | 12 | 13 | if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return; 14 | let args = message.content.substring(prefix.length).trim().split(" "); // Argları ayıklama 15 | let commandName = args[0].toLowerCase() // Komut ismi alma 16 | 17 | args = args.splice(1) // Argstan komutu silme 18 | 19 | const embed = new MessageEmbed().setFooter({ text: settings.ozellestirme.footer }).setColor("BLACK").setAuthor({ name: message.member.displayName, iconURL: message.author.avatarURL({ dynamic: true }) }); 20 | 21 | let cmd = client.commands.has(commandName) ? client.commands.get(commandName) : client.commands.get(client.aliases.get(commandName)); // Oyle bir komut avr mı diye sorgulamak 22 | 23 | if (cmd) { 24 | // Komut sunucuya özel mi ? 25 | // if(cmd.conf.guildOnly == true && !message.guild){ 26 | // return message.channel.send({ content:"Bu komut sunucuya özeldir" }) 27 | // } 28 | // Bu özellik suanlık kapalidir. 29 | 30 | // Komudu kurucuya ozel yapma 31 | if (cmd.conf.owner && !settings.ekip.kurucu.includes(message.author.id)) { 32 | const embed = new MessageEmbed().setFooter({ text: settings.ozellestirme.footer }).setColor("BLACK").setAuthor({ name: message.member.displayName, iconURL: message.author.avatarURL({ dynamic: true }) }).setTitle("Vay çakal senii!").addField("Bu komutu kullanamazsın", "Bu komutu kullanmak için gerekli yetkiye sahip değilsin!", true).setTimestamp(); 33 | return message.reply({ embeds: [embed] }) 34 | } 35 | // Enabled olmayan komutları ayklama 36 | if (!settings.ekip.kurucu.includes(message.author.id)) { 37 | if (cmd.conf.enabled == false) { 38 | const embed = new MessageEmbed().setFooter({ text: settings.ozellestirme.footer }).setColor("BLACK").setAuthor({ name: message.member.displayName, iconURL: message.author.avatarURL({ dynamic: true }) }).setTitle("Üzgünüm :(").addField("Bu komutu kullanamazsın", "Bu komut şuan herkese açık durumda değil! sonra tekrardan dene", true).setTimestamp(); 39 | return message.reply({ embeds: [embed] }) 40 | } 41 | } 42 | 43 | const komutLogEmbedi = new MessageEmbed() 44 | .setTitle(cmd.conf.name + " Komutu kullanıldı") 45 | .setColor("GREEN") 46 | .setTimestamp() 47 | .setFooter({ text: settings.ozellestirme.footer }) 48 | .setDescription(` 49 | ▫ Komutu Kullanan Kullanıcı : ${message.author.username} **(${message.author.id})** 50 | ▫ Kullanılan komut ismi : ${cmd.conf.name} 51 | ▫ Tür : Mesaj 52 | `) 53 | 54 | try { 55 | cmd.run(client, message, args, embed, prefix); 56 | client.channels.cache.get(settings.ozellestirme.kanal.komutLog).send({ embeds: [komutLogEmbedi] }) 57 | } catch (error) { 58 | console.log(chalk.red("[HATA] bir komut çalıştırılırken bir problem yaşandı!")); 59 | console.error(error); 60 | message.reply({ content: 'Komutu çalıştırırken hata ile karşılaştım geliştiricime ulaşın.' }); 61 | } 62 | } else { 63 | // Komut bulunamadı - şunu mu demek istediniz? 64 | const allCommands = []; 65 | const sameCommands = []; 66 | client.commands.forEach(cmd => { 67 | allCommands.push(cmd.conf.name) 68 | cmd.conf.aliases.forEach(a => { 69 | allCommands.push(a) 70 | }) 71 | }) 72 | let slicedCommand = commandName.slice(0, 2) 73 | allCommands.forEach(command => { 74 | if (command.startsWith(slicedCommand)) return sameCommands.push(command) 75 | }) 76 | if (sameCommands.length >= 1) { 77 | let emed = new MessageEmbed() 78 | .setTitle("Uh, Oh!") 79 | .setColor("DARK_RED") 80 | .setDescription(`Sanırım yanlış bir alana geldin ama üzülme sana gidebileceğin yerleri buldum!`) 81 | .addField("Gidebileceğin bazı yerler", `**${prefix}** ön eki ile; \n${sameCommands.join(`\n`)}`, true) 82 | .addField(`Nasıl yolumu bulacağım?`, `${prefix}yardım yazarak yolunuzu bulabilirsinz. \n Dikkatli olun :)`, true) 83 | .setFooter({ text: settings.ozellestirme.footer }) 84 | .setTimestamp() 85 | message.channel.send({ embeds: [emed] }) 86 | } else { 87 | let emed = new MessageEmbed() 88 | .setTitle("Uh, Oh!") 89 | .setColor("DARK_RED") 90 | .setDescription(`Sanırım yanlış bir alana geldin ama üzülmelisin cunku sana bir yol bulamadim.`) 91 | .addField("Gidebileceğin bazı yerler!", `Bulunmuyor :( `, true) 92 | .addField(`Nasıl yolumu bulacağım?`, `${prefix}yardım yazarak yolunuzu bulabilirsinz. dikkatli olun :)`, true) 93 | .setFooter({ text: settings.ozellestirme.footer }) 94 | .setTimestamp() 95 | message.channel.send({ embeds: [emed] }) 96 | } 97 | } 98 | } 99 | 100 | // usenmesem cooldown :D 101 | module.exports.conf = { 102 | name: "messageCreate", 103 | }; 104 | 105 | /* Bu altyapi theChain tarafından yapılmıştır! Eger bir sorun yasar iseniz github profilimden discord profilime ulaşabilirsiniz */ 106 | /* Emeğe saygı konusunda altyapıyı kendininiz çalmamanız her türlü daha hoş olur */ --------------------------------------------------------------------------------