请求验证:修改频道类型为GUILD_TEXT是否修复channel.isText错误
验证Discord机器人频道创建参数修改是否修复TypeError错误
开发Discord机器人时出现TypeError: channel.isText is not a function错误,此前创建频道时type参数使用的是'text',现已将其修改为'GUILD_TEXT',相关代码如下:
interaction.guild.channels.create(`${interaction.values}-${interaction.user.username}`, { //ticket_name parent: config.ticketparent, topic: interaction.user.id, permissionOverwrites: [{ id: interaction.user.id, allow: ['VIEW_CHANNEL','SEND_MESSAGES'], }, { id: config.ticketrole, allow: ['SEND_MESSAGES', 'VIEW_CHANNEL'], }, { id: interaction.guild.roles.everyone, deny: ['VIEW_CHANNEL'], }, ], type: 'GUILD_TEXT', //i think the error is from here in past i have here text but not i have GUILD_TEXT })
请验证此修改是否已修复该错误。错误截图如下:

若截图无法加载,请告知重新提供。
内容的提问来源于stack exchange,提问作者Mpamphs Karudas
相关产品推荐
相关产品推荐

