├── README.md ├── astpod.js ├── config.json └── package.json /README.md: -------------------------------------------------------------------------------- 1 | # Kurulum 2 | 3 | 1) Dosyaları indirin. 4 | 2) İndirdiğiniz dosyaları zip dosyasından çıkarıp bir dosya haline getirin. 5 | 3) Shift + Sağ Tık ile tıklayın. PowerShell şeklinde açın. 6 | 4) Açılan pencere içerisine "npm install" yazın ve "Enter" basın. Tamamlandıktan sonra pencereyi kapatın. 7 | 5) Kaynak kodu düzenleyiciniz ile **config.json** kısmını sunucunuza göre dizayn edin. 8 | 6) Dizayn ettiğiniz config.json dosyasını kaydedip kapatın. 9 | 7) Klasörün içinde bulunan `baslat.bat` uzantılı _batch_ dosyasını açın. 10 | 8) Tokenini girmiş olduğunuz bot sunucuda ekliyse çalışmaya başlayacaktır. 11 | 12 | Sorun Olursa: Astpod#2019 13 | 14 | Stara basın aq 15 | -------------------------------------------------------------------------------- /astpod.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client() 3 | const moment = require("moment-timezone"); 4 | const fetch = require('node-fetch'); 5 | const cfg = require("./config.json"); 6 | 7 | client.on("ready", async () => { 8 | client.user.setActivity(cfg.status) 9 | console.log("Bot olarak girdim hadi spamla koçum beni") 10 | }) 11 | 12 | class Astpod { 13 | constructor() { 14 | this.astpodInterval; 15 | } 16 | 17 | async setVanityURL(url, guild) { 18 | const time = moment.tz(Date.now(), "Europe/Istanbul").format("HH:mm:ss"); 19 | console.log(`[${time}] [${url}] adlı URL spamlanıyor`); 20 | return await fetch(`https://discord.com/api/v8/guilds/${guild.id}/vanity-url`, { 21 | "credentials": "include", 22 | "headers": { 23 | "accept": "*/*", 24 | "authorization": "Bot " + client.token, 25 | "content-type": "application/json", 26 | }, 27 | "referrerPolicy": "no-referrer-when-downgrade", 28 | "body": JSON.stringify({ 29 | "code": url 30 | }), 31 | "method": "PATCH", 32 | "mode": "cors" 33 | }); 34 | } 35 | async checkVanityURL(url) { 36 | return await fetch(`https://discord.com/api/v8/guilds/${guild.id}/vanity-url`, { 37 | "credentials": "include", 38 | "headers": { 39 | "accept": "*/*", 40 | "authorization": "Bot " + client.token, 41 | "content-type": "application/json", 42 | }, 43 | "referrerPolicy": "no-referrer-when-downgrade", 44 | "method": "GET", 45 | "mode": "cors" 46 | }); 47 | } 48 | 49 | async startURL(url, guild) { 50 | this.astpodInterval = setInterval(async () => { 51 | await this.setVanityURL(url, guild); 52 | }, 1*1000); 53 | } 54 | 55 | stopURL() { 56 | return clearInterval(this.astpodInterval); 57 | } 58 | } 59 | 60 | let sex = new Astpod(); 61 | 62 | client.on('message', async (message) => { 63 | let messageArray = message.content.split(" ") 64 | const args = messageArray.slice(1); 65 | const args1 = message.content.slice(cfg.prefix.length).split(/ +/) 66 | const command = args1.shift().toLowerCase(); 67 | 68 | if (command === "başlat") { 69 | if(!cfg.owner.includes(message.author.id)) return 70 | 71 | let url = args[0]; 72 | if(!url) return message.channel.send(`Bir URL belirlemelisin`) 73 | 74 | if (!message.guild.features.includes('VANITY_URL')) { 75 | return message.channel.send("x"); 76 | } 77 | 78 | message.channel.send(`Başarılı şekilde **${url}** adlı URL spamlanıyor.`); 79 | 80 | console.log(`URL spamlamayı ${url} olarak ayarladım !`); 81 | await sex.startURL(url, message.guild); 82 | } if (command === "durdur") { 83 | if(!cfg.owner.includes(message.author.id)) return 84 | 85 | sex.stopURL(); 86 | 87 | message.channel.send(`Başarılı şekilde URL spamlaması durduruldu.`) 88 | 89 | console.log(`Durdum amk`) 90 | } if (command === "kontrol") { 91 | if(!cfg.owner.includes(message.author.id)) return 92 | 93 | message.channel.send(`Botun güncel pingi: **${client.ws.ping}**`) 94 | }; 95 | }); 96 | 97 | client.login(cfg.token).then(x => console.log("Tokenim kalktı")).catch(e => console.error("Tokenim indi")) 98 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "owner": [""], 3 | "status": "", 4 | "prefix": "!", 5 | "token": "" 6 | } 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "astpod.js", 3 | "scripts": { 4 | "start": "node astpod.js" 5 | }, 6 | "dependencies": { 7 | "discord.js": "^12.5.1", 8 | "node-fetch": "^2.6.1", 9 | "moment-timezone": "^0.5.33" 10 | }, 11 | "engines": { 12 | "node": "12.x" 13 | } 14 | } 15 | --------------------------------------------------------------------------------