Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Changing the order of channels/channel position #187

Closed
1 task done
theOneSchrill opened this issue May 2, 2024 · 5 comments
Closed
1 task done

Changing the order of channels/channel position #187

theOneSchrill opened this issue May 2, 2024 · 5 comments
Labels
status: to be fixed This bug/doc error will be fixed soon type: suggestion Related to suggesting a new feature

Comments

@theOneSchrill
Copy link

A syntax to make channels change their position would be cool

A syntax to change channels order
I want to change one channels position, the other channels shall move accordingly, pretty much just the same process as when u do it manually in your discord servers settings.

'set channel position of event-channel to (channel position of event-channel)+1'
no

@theOneSchrill theOneSchrill added status: waiting Waiting for a developer to assign the right status type: suggestion Related to suggesting a new feature labels May 2, 2024
@ItsTheSky
Copy link
Member

Are you talking about this expression? You can modify it, have you tried it yet?

@theOneSchrill
Copy link
Author

Yea I've tried it with that expression but when I used set channel position of event-channel to (channel position of event-channel)+1 it didnt change the position of the channel (same with -1)

@ItsTheSky ItsTheSky added status: to be fixed This bug/doc error will be fixed soon and removed status: waiting Waiting for a developer to assign the right status labels May 3, 2024
@ItsTheSky
Copy link
Member

Hi there! After some tests, It seems a lot of weird things are happening with the syntax. Can you try using the possession pattern? For instance:

set <channel>'s channel position to {_pos}

@theOneSchrill
Copy link
Author

theOneSchrill commented May 3, 2024

Hey! So after trying this, it seems like some channels are moving only and they're moving a little weird. The channel which I selected was at position 1 (of a total of 3 channels). The channel got moved to position 3 instead of 2. After that, I couldn't move it back up with my up button
Code: https://justpaste.it/fb3hp
the bot successfully replies with up and down, depending what button I click on.

@ItsTheSky
Copy link
Member

Yup, the whole logic I did behind was broken (cuz math wasn't mathing). Although it got fixed, it seems positioning two channels at the same position will make them re-arrange in another way (sorted by creation date).
I'll close this issue as I got it working fine on my end with v4.16.0 that's coming soon. Feel free to open a new one if the problem persists!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status: to be fixed This bug/doc error will be fixed soon type: suggestion Related to suggesting a new feature
Projects
None yet
Development

No branches or pull requests

2 participants