category = inter.guild.get_channel(1274758658525364329)
newChannel = await inter.guild.create_text_channel(name=f"New Channel", category=category )
Argument of type "GuildChannel" cannot be assigned to parameter "category" of type "CategoryChannel | None" in function "create_text_channel"
This problem is raised by Pylance and we see get_channel has no chance of returning a category as per the return values:
def get_channel(self, channel_id: int, /) -> Optional[GuildChannel]:
"""Returns a channel with the given ID.
Any response in advance is appreciated.