Yardım Token To oAuth

Loys
Katılım
5 Eki 2023
Mesajlar
2
Tepkime puanı
0
Şehir
İstanbul
Token To oAuth tool varmı
 
Konu Sahibi
Loys
Loys
Katılım
5 Eki 2023
Mesajlar
2
Tepkime puanı
0
Şehir
İstanbul
+UP
 
STasaR#1814
Katılım
4 Mar 2022
Mesajlar
6
Tepkime puanı
0
Token To oAuth tool varmı
Basit bir tokentooauth komutu


JavaScript:
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.MessageContent,
  ],
});

const prefix = '!'; // Komut ön-eki

client.once('ready', () => {
  console.log(`Bot ${client.user.tag} olarak giriş yaptı!`);
});

client.on('messageCreate', (message) => {
  if (message.author.bot) return; // Botun kendi mesajlarını işleme alma
  if (!message.content.startsWith(prefix)) return; // Ön-ekle başlamayan mesajları işleme alma

  const args = message.content.slice(prefix.length).trim().split(/ +/);
  const command = args.shift().toLowerCase();

  if (command === 'token2oauth') {
    // token2oauth komutunu işle
    const token = args[0]; // Tokeni komuttan al

    // Tokeni OAuth2 bağlantısına çevir
    const oauthLink = `https://discord.com/oauth2/authorize?client_id=${client.user.id}&scope=bot&permissions=YOUR_PERMISSIONS&token=${token}`;

    message.reply(`İşte OAuth2 bağlantısı: ${oauthLink}`);
  }
});

client.login('YOUR_BOT_TOKEN');
 

Konuyu 1 kişi okuyor. (0 kayıtlı üye ve 1 ziyaretçi)

Benzer konular

  • Bilgi