Yardım Discord birden fazla botu sese sokma

sweet9927
Katılım
12 Tem 2023
Mesajlar
5
Tepkime puanı
0
Şehir
Ağrı
Discord Welcome botum vardı eski bir altyapı v12 ancak şuan çalışmıyor.

yeni bir altyapı arıyorum 1den fazla botu farklı farklı seslere sokmak için.
 
ensomg
Katılım
13 Tem 2023
Mesajlar
1
Tepkime puanı
0
Şehir
Yurtdışı
Sadece seste durucaksa v14 boş bir altyapıya 2-3 satır kod yazıp sese sokabilirsiniz
 
Konu Sahibi
sweet0690
sweet9927
Katılım
12 Tem 2023
Mesajlar
5
Tepkime puanı
0
Şehir
Ağrı
Sadece seste durucaksa v14 boş bir altyapıya 2-3 satır kod yazıp sese sokabilirsiniz
Evet sadece sesde durcak. ancak birden fazla botu sokacamğım tokenle altyapı varsa atarmısn veya bulurmusun.
Ben Baktımda Bulamadım v14 altyapısı
 
zedyn.js
Katılım
4 Şub 2022
Mesajlar
105
Tepkime puanı
13
Şehir
İstanbul
Discord Welcome botum vardı eski bir altyapı v12 ancak şuan çalışmıyor.

yeni bir altyapı arıyorum 1den fazla botu farklı farklı seslere sokmak için.
En güncell modüller kullanıldı, herhangi bir .js uzantılı dosyaya koy ve olduğu dizinde
Bash:
npm init -y
yazarak package.json dosyası oluştur, ardından
Bash:
npm i discord.js @discordjs/voice
yazarak gerekli kütüphaneleri ekle ve
Bash:
node dosyadı.js
ile çalıştır.

JavaScript:
const { Client, GatewayIntentBits, Events } = require('discord.js');
const { joinVoiceChannel } = require('@discordjs/voice');

const tokens = ['', '', ''];

const channels = ['', '', ''];

tokens.forEach((token, index) => {
    const client = new Client({
        intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates],
    });

    client.once(Events.ClientReady, async (client) => {
        console.log('\x1b[32m', `[+] ${index + 1}. Bot Aktif`);

        const channel = client.channels.cache.get(channels[index]);

        if (channel) {
            joinVoiceChannel({
                selfDeaf: true,
                selfMute: true,
                group: client.user.id,
                channelId: channel.id,
                guildId: channel.guild.id,
                adapterCreator: channel.guild.voiceAdapterCreator,
            });
        } else {
            console.log('\x1b[31m', `[-] ${index + 1}. Kanal Bulunamadı`);
        }
    });

    client.login(token);
});
 
  • Beğen
Tepkiler: sweet0690
Konu Sahibi
sweet0690
sweet9927
Katılım
12 Tem 2023
Mesajlar
5
Tepkime puanı
0
Şehir
Ağrı
En güncell modüller kullanıldı, herhangi bir .js uzantılı dosyaya koy ve olduğu dizinde
Bash:
npm init -y
yazarak package.json dosyası oluştur, ardından
Bash:
npm i discord.js @discordjs/voice
yazarak gerekli kütüphaneleri ekle ve
Bash:
node dosyadı.js
ile çalıştır.

JavaScript:
const { Client, GatewayIntentBits, Events } = require('discord.js');
const { joinVoiceChannel } = require('@discordjs/voice');

const tokens = ['', '', ''];

const channels = ['', '', ''];

tokens.forEach((token, index) => {
    const client = new Client({
        intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates],
    });

    client.once(Events.ClientReady, async (client) => {
        console.log('\x1b[32m', `[+] ${index + 1}. Bot Aktif`);

        const channel = client.channels.cache.get(channels[index]);

        if (channel) {
            joinVoiceChannel({
                selfDeaf: true,
                selfMute: true,
                group: client.user.id,
                channelId: channel.id,
                guildId: channel.guild.id,
                adapterCreator: channel.guild.voiceAdapterCreator,
            });
        } else {
            console.log('\x1b[31m', `[-] ${index + 1}. Kanal Bulunamadı`);
        }
    });

    client.login(token);
});
Teşekkür Ederim Çalıştı.
 

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

  • Bilgi