Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

channel.setParent not doing anything and returns no errors #6275

Closed
ItsKodas opened this issue Aug 2, 2021 · 8 comments · Fixed by #6276
Closed

channel.setParent not doing anything and returns no errors #6275

ItsKodas opened this issue Aug 2, 2021 · 8 comments · Fixed by #6276

Comments

@ItsKodas
Copy link

ItsKodas commented Aug 2, 2021

I've spent about 5 hours updating my code to work with v13 from v12 and I got to a point where I physically can't move any further.
I've spent at least 2 hours trying to get it to work and I'm just getting no where, channel.setParent() is doing absolutely nothing, no error and the channel doesn't move into a diff category.

client.on('messageCreate', async message => {    
        if (message.content.toLowerCase() === '!test') {
            var guild = client.guilds.cache.get('847246917654151168')
            var channel = guild.channels.cache.get('871801544004235356')
            var log = await channel.setParent('847246918220251160', { lockPermissions: false })
            console.log(log)
        }
    })

Further details:

  • discord.js version: 13.0.0-dev.t1627906063.6e0ea02
  • Node.js version: v14.17.4
  • Operating system: Windows 11 - 10.0.22000 Build 22000
  • Priority this issue should have – please be realistic and elaborate if possible: It's high for me but I wouldn't know about everyone else, anyone with a ticket system that changes the parent wouldn't function.

Relevant client options:

  • partials: ['MESSAGE', 'CHANNEL', 'REACTION', 'USER', 'GUILD_MEMBER']
  • gateway intents: ALL
  • other: none
@Jiralite
Copy link
Member

Jiralite commented Aug 2, 2021

This is a bug.

This happened because #6210 reverted what #6232 implemented...

@ItsKodas
Copy link
Author

ItsKodas commented Aug 2, 2021

I'm glad I didn't do some silly mess up with my own code haha, any eta on a fix?

@NotSugden
Copy link
Contributor

NotSugden commented Aug 2, 2021

This is a bug.

This happened because #6210 reverted what #6232 implemented...

oopsies, must've got lost in the rebase 😓

<GuildChannel>.edit({ parent: ... }); should work though!

@ItsKodas
Copy link
Author

ItsKodas commented Aug 2, 2021

Thanks @NotSugden I'll use that as a temporary fix 😄

@ImRodry
Copy link
Contributor

ImRodry commented Aug 2, 2021

It should be parentId though, parent doesn't make much sense... Ignore my silliness I forgot this accepts a channel resolvable

@ItsKodas
Copy link
Author

ItsKodas commented Aug 2, 2021

@ImRodry I believe it being parent makes sense as it can be either an object or snowflake :)

@Jiralite
Copy link
Member

Jiralite commented Aug 2, 2021

It should be parentId though, parent doesn't make much sense...

Well it won't make much sense right now due to this issue but it should accept parent which takes a CategoryChannelResolvable, which is not just the id of the channel, but also a CategoryChannel.

@ItsKodas
Copy link
Author

ItsKodas commented Aug 2, 2021

This is a bug.
This happened because #6210 reverted what #6232 implemented...

oopsies, must've got lost in the rebase 😓

<GuildChannel>.edit({ parent: ... }); should work though!

Your fix works nicely, thanks :D

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants