尝试创建通道时,“TextChannel类型的对象不可JSON序列化”

2024-05-16 12:29:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使它这样,如果一个频道被删除,它将在一个小时后重新制作。但当我使用此代码时:

async def on_guild_channel_delete(channel): 
            guild = channel.guild                   
      await guild.create_text_channel(channel)

它返回:Object of type TextChannel is not JSON serializable

有没有办法解决这个问题


Tags: of代码textasyncobjectondeftype