• If you need help or want to discuss things, you now can also join us on our Discord Server!

Solved Bot is creating channels in a weird order

Montiary

Donor
is awesome!
hey i am writing a script to automate channel creation.
my script is working but the bot starts creates the channel from bootem.

normaly it should look like this
channel1
channel2
channel3

my but do
channel3
channel2
channel1

and i dont understand why.

here is the channel creation part:
JavaScript:
                var create = backend.createChannel({
                    name: ChannelNameFinish,
                    parent: "0",
                    position: ChannelPosition,
                    permanent: true,
                    codec: parseInt(ChannelCodec),
                    codecQuality: parseInt(parseInt(ChannelQuality)),
                    maxClients: parseInt(ChannelMaxClients),
                    description: ChannelDescription
                });
i also tried ChannelPosition+1 but it doesnt work
 

Attachments

Montiary

Donor
is awesome!
try to set position, this should set in which order a channel gets created otherwise i suppose it just creates it at the top most channel

https://sinusbot.github.io/scripting-docs/#channelparams
i already set the position "position: ChannelPosition,"

but with this the bot create the channel in top of the other channel and with "position: ChannelPosition+1"
the bot create the channel under the next channel and that is wrong
 

Similar threads

Top