【发布时间】:2020-10-02 03:23:10
【问题描述】:
发出踢腿命令。
我正在尝试发出命令,以便管理员不能互相踢。
if(message.author.hasPermission('KICK_MEMBER', 'ADMINISTRATOR') && message.member.hasPermission('KICK_MEMBER', 'ADMINISTRATOR'))
return ('You cant kick another admin!')
但我得到一个错误。
TypeError: message.author.hasPermission 不是函数
【问题讨论】:
-
请同时提供您收到的错误消息。
-
TypeError: message.author.hasPermission is not a function在主要问题中也进行了编辑。 -
我不太熟悉
discord.js。然而,从文档中它说作者属于user类型,它没有hasPermission()函数。好像是GuildMember类型的函数。
标签: discord discord.js