samedi 13 février 2021

How do i fix this random discord.js issue

I want to make some "Join To Create" bot, with a random voice channel name. and it's only showing "name 2", and the other name is not shown... please help me

    const name = [
    'name 1',
    'name 2',
    'name 3',
    'name 4',
    'name 5'
    ];

    const rand = Math.floor(Math.random() * name.length);

    await user.guild.channels.create(name[rand] {
            type: 'voice',
            parent: "804342854432194591"
    });




Aucun commentaire:

Enregistrer un commentaire