• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Solved Bot is creating channels in a weird order

Montiary

Active Member
Contributor
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

  • Montys_Auto_Channel_Creator.js
    6.4 KB · Views: 8

Montiary

Active Member
Contributor
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
 

Montiary

Active Member
Contributor
found the porblem the posiotion need to be the channel id of the channel above ......
 
Top