#I want it to create them above the afk
1 messages ยท Page 1 of 1 (latest)
I sent it on #djs-help-v14 :)
did you try to make position: to position of the "create voice" channel + 1?
newstate.channel.position+1
oh, let me try, but first I want to check something
const category = client.channels.cache.get('1050410392502931456')
const channels = category.children.cache.map(c => c.rawPosition)
console.log(channels)
this returns
[
25, 10, 23, 7, 11,
9, 26, 9, 8, 24,
22, 10
]
I have 2 custom voices created
there are 2 with 10 and 9
[
{ position: 7, name: '๐โแดฉแดสสษชแด 1' },
{ position: 11, name: '๐โแด๊ฐแด' },
{ position: 9, name: '๐โแดแดสสษชแด 3' },
{ position: 9, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #1' },
{ position: 8, name: '๐โแดฉแดสสษชแด 2' },
{ position: 10, name: '๐โแดสแดแดแดแด แด แดษชแดแด' }
]
wait
did you try this?
[
{ position: 25, name: '๐คโ๐๐จ๐ฆ๐๐ง๐ณ๐ข-๐๐จ๐ญ' , type: 0 },
{ position: 23, name: '๐ทโ๐๐จ๐ณ๐' , type: 0 },
{ position: 7, name: '๐โแดฉแดสสษชแด 1', type: 2 },
{ position: 11, name: '๐โแด๊ฐแด', type: 2 },
{ position: 9, name: '๐โแดแดสสษชแด 3', type: 2 },
{ position: 26, name: '๐ฉโ๐๐ซ๐จ๐ฉ๐ฎ๐ง๐๐ซ๐ข' , type: 15 },
{ position: 9, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #1', type: 2 },
{ position: 8, name: '๐โแดฉแดสสษชแด 2', type: 2 },
{ position: 24, name: '๐คนโ๐
๐๐ณ๐๐ง' , type: 0 },
{ position: 22, name: '๐ฌโ๐๐ก๐๐ญ' , type: 0 },
{ position: 10, name: '๐โแดสแดแดแดแด แด แดษชแดแด', type: 2 },
{ position: 10, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #2', type: 2 }
]
{ position: 10, name: '๐โแดสแดแดแดแด แด แดษชแดแด', type: 2 },
{ position: 10, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #2', type: 2 }

lets see
Im not exactly sure, but it can be possible
hmn
hmm, no, at least if I will create 2 channels with position 2, it will show that second one has position 3
somehow this works position: newstate.channel.rawPosition
yeah
if I use newstate.channel.rawPosition + 1 they are created under afk
and what about just position + 1?
newstate.channel.position is 3
so they are created at the top of all voice channels
well, then I will just stick with this
hmm, thats interest
HMM, very interesting
[
{ position: 25, name: '๐คโ๐๐จ๐ฆ๐๐ง๐ณ๐ข-๐๐จ๐ญ' , type: 0 },
{ position: 23, name: '๐ทโ๐๐จ๐ณ๐' , type: 0 },
{ position: 7, name: '๐โแดฉแดสสษชแด 1', type: 2 },
{ position: 11, name: '๐โแด๊ฐแด', type: 2 },
{ position: 9, name: '๐โแดแดสสษชแด 3', type: 2 },
{ position: 26, name: '๐ฉโ๐๐ซ๐จ๐ฉ๐ฎ๐ง๐๐ซ๐ข' , type: 15 },
{ position: 10, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #2', type: 2 },
{ position: 8, name: '๐โแดฉแดสสษชแด 2', type: 2 },
{ position: 24, name: '๐คนโ๐
๐๐ณ๐๐ง' , type: 0 },
{ position: 10, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #1', type: 2 },
{ position: 22, name: '๐ฌโ๐๐ก๐๐ญ' , type: 0 },
{ position: 10, name: '๐โแดสแดแดแดแด แด แดษชแดแด', type: 2 }
]
they all have 10
I have changed my code so position: 2, and then changed back to newstate.channel.position+1, and now it spawns after afk channel
its raw position?
yes
and position
[
{ position: 3, name: '๐คโ๐๐จ๐ฆ๐๐ง๐ณ๐ข-๐๐จ๐ญ' , type: 0 },
{ position: 1, name: '๐ทโ๐๐จ๐ณ๐' , type: 0 },
{ position: 0, name: '๐โแดฉแดสสษชแด 1', type: 2 },
{ position: 6, name: '๐โแด๊ฐแด', type: 2 },
{ position: 2, name: '๐โแดแดสสษชแด 3', type: 2 },
{ position: 0, name: '๐ฉโ๐๐ซ๐จ๐ฉ๐ฎ๐ง๐๐ซ๐ข' , type: 15 },
{ position: 5, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #2', type: 2 },
{ position: 1, name: '๐โแดฉแดสสษชแด 2', type: 2 },
{ position: 2, name: '๐คนโ๐
๐๐ณ๐๐ง' , type: 0 },
{ position: 4, name: '๐โแดแด๊ฑแดแดแด แด แดษชแดแด #1', type: 2 },
{ position: 0, name: '๐ฌโ๐๐ก๐๐ญ' , type: 0 },
{ position: 3, name: '๐โแดสแดแดแดแด แด แดษชแดแด', type: 2 }
]
then its ok
because you set its position to 10
rawPosition is how it stores, and position is how it renders iirc
