if "id" in data: del data["id"]
ctype = data.get("type", ChannelType.GUILD_TEXT)
if "type" in data: del data["type"]
if "permission_overwrites" in data: del data["permission_overwrites"] # TODO: set permission_overwrites after channel creation
channel = Channel(Snowflake.makeId(), ctype, guild_id=guild.id, **data)
channel = await core.createGuildChannel(channel)
await core.sendChannelCreateEvent(channel)
https://github.com/yepcord/server/blob/e59f314588538ae39602f5ccb8715f915e0308c7/server/http_api/main.py#L1411