#I want it to create them above the afk

1 messages ยท Page 1 of 1 (latest)

unreal dust
#

@fossil ginkgo lets continue here

fossil ginkgo
unreal dust
#

did you try to make position: to position of the "create voice" channel + 1?

#

newstate.channel.position+1

fossil ginkgo
#

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

unreal dust
#

hmm

#

probably, its voice and text channels

#

filter it by type

fossil ginkgo
#
[
  { position: 7, name: '๐Ÿ”Šโ•Žแดฉแดœส™สŸษชแด„ 1' },
  { position: 11, name: '๐Ÿ”‡โ•Žแด€๊œฐแด‹' },
  { position: 9, name: '๐Ÿ”Šโ•Žแด˜แดœส™สŸษชแด„ 3' },
  { position: 9, name: '๐Ÿ”ˆโ•Žแด„แดœ๊œฑแด›แดแด แด แดษชแด„แด‡ #1' },
  { position: 8, name: '๐Ÿ”Šโ•Žแดฉแดœส™สŸษชแด„ 2' },
  { position: 10, name: '๐Ÿ”Šโ•Žแด„ส€แด‡แด€แด›แด‡ แด แดษชแด„แด‡' }
]
#

wait

unreal dust
fossil ginkgo
#
[
  { 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 }
fossil ginkgo
unreal dust
#

hmn

#

hmm, no, at least if I will create 2 channels with position 2, it will show that second one has position 3

fossil ginkgo
#

somehow this works position: newstate.channel.rawPosition

unreal dust
#

yeah

fossil ginkgo
#

if I use newstate.channel.rawPosition + 1 they are created under afk

unreal dust
#

and what about just position + 1?

fossil ginkgo
#

newstate.channel.position is 3

#

so they are created at the top of all voice channels

fossil ginkgo
unreal dust
#

HMM, very interesting

fossil ginkgo
#
[
  { 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

unreal dust
#

I have changed my code so position: 2, and then changed back to newstate.channel.position+1, and now it spawns after afk channel

fossil ginkgo
#

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 }
]
unreal dust
#

because you set its position to 10

#

rawPosition is how it stores, and position is how it renders iirc

fossil ginkgo
#

well, that shouldn't work like that but it works blobguns

#

problem solved