get_all_channel = await ctx.client.rest.fetch_guild_channels(guild=ctx.guild_id) #type: ignore
the_corpuses = await ctx.client.rest.fetch_guild(guild=1009413973092876388)
for channels in get_all_channel:
if isinstance(channels, hikari.GuildCategory):
new_category = await the_corpuses.create_category(
name=channels.name, #type:ignore
position=channels.position
)
created_category_to_list[channels.position] = new_category.position
print(created_category_to_list)
elif isinstance(channels, hikari.TextableGuildChannel):
new_category_id = created_category_to_list.get(channels.parent_id)
await the_corpuses.create_text_channel(
name=channels.name, #type: ignore
position=new_category_id #type: ignore
)
I am trying to copy and paste my old server to a newer one. But instead of using templates I want to use this one cause it's just a shift and not a new guild is being created.
What I want to know here:
- How to. I am not correct with my logic here.
- Why is there no parameter of
parent_idwithin this:
await the_corpuses.create_text_channel(
name=channels.name, #type: ignore
position=new_category_id #type: ignore
)

