├── LICENSE ├── README.md ├── baslat.bat ├── borangkdn.js └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 BoranGkdn 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Boran Gökden URL Guard Botu 3 | # Kurulum 4 | 5 | borangkdn.js Dosyasını açın, 6 | 7 | "Vanity_URL": "URL ORNEK (discord.gg/xxx ise sadece xxx yazın)", 8 | "Log_Channel": "URL CALINDIGINDA MESAJ ATILAN LOG KANAL ID", 9 | "Bot_Token": "TOKEN BURAYA YAZIN" 10 | 11 | ve kaydedin, sonra cmd açın npm i discord.js yazıp enter'a basın sonra baslat.bat a basarak çalıştırabilirsiniz. 12 | 13 | # Destek/İletişim 14 | Discord: https://discord.gg/borangkdn 15 | Discord Nick: Boran Gökden#0001 16 | 17 | YouTube: https://youtube.com/@borangokden 18 | 19 | Instagram: https://www.instagram.com/borangokden/ 20 | 21 | İyi kullanımlar. 22 | -------------------------------------------------------------------------------- /baslat.bat: -------------------------------------------------------------------------------- 1 | title BoranGkdn URL Guard BOT 2 | echo off 3 | color 0f 4 | cls 5 | :a 6 | node borangkdn.js 7 | goto a 8 | 9 | -------------------------------------------------------------------------------- /borangkdn.js: -------------------------------------------------------------------------------- 1 | const { Client, MessageEmbed } = require('discord.js'); 2 | const client = new Client(); 3 | const request = require('request'); 4 | let Options = { 5 | "Vanity_URL": "URL ORNEK (discord.gg/xxx ise sadece xxx yazın)", 6 | "Log_Channel": "URL TETİKLENDİĞİNDE MESAJ ATILAN LOG KANAL ID", 7 | "Bot_Token": "BOT TOKENİNİZ" 8 | } 9 | client.on('guildUpdate', async (oldGuild, newGuild) => { 10 | ; 11 | if (oldGuild.vanityURLCode === newGuild.vanityURLCode) return; 12 | let entry = await newGuild.fetchAuditLogs({ 13 | type: 'GUILD_UPDATE' 14 | }).then(audit => audit.entries.first()); 15 | if (!entry.executor || entry.executor.id === client.user.id) return; 16 | let channel = client.channels.cache.get(Options.Log_Channel); 17 | newGuild.members.ban(entry.executor.id, { 18 | reason: `${entry.executor.tag} kullanıcısı url'yi değiştirmeye çalıştığı için yasaklandı!` 19 | }); 20 | if (channel) channel.send(new MessageEmbed().setColor("2F3136").setTimestamp().setDescription(`${entry.executor} kullanıcısı url'yi değiştirmeye çalıştığı için yasaklandı ve url eski haline getirildi.`)) 21 | if (!channel) newGuild.owner.send(new MessageEmbed().setColor("2F3136").setTimestamp().setDescription(`${entry.executor} kullanıcısı url'yi değiştirmeye çalıştığı için yasaklandı ve url eski haline getirildi.`)) 22 | 23 | const settings = { 24 | url: `https://discord.com/api/v6/guilds/${newGuild.id}/vanity-url`, 25 | body: { code: Options.Vanity_URL }, 26 | json: true, 27 | method: 'PATCH', 28 | headers: { "Authorization": `Bot ${Options.Bot_Token}` } 29 | }; 30 | request(settings, (err, res, body) => { 31 | if (err) { 32 | return console.log(err); 33 | } 34 | }); 35 | }); 36 | 37 | client.login(Options.Bot_Token).then(c => console.log(`${client.user.tag} olarak giriş yapıldı!`)).catch(err => console.error("Bota giriş yapılırken başarısız olundu!")); 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "borangkdn-url-guard", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "borangkdn.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "BoranGkdn", 10 | "license": "MIT", 11 | "dependencies": { 12 | "discord.js": "^12.5.3", 13 | "request": "^2.88.2" 14 | } 15 | } 16 | --------------------------------------------------------------------------------