message.member.roles.has()
requires a role ID as an argument, whereas here, you are passing in a function.
(message.member.roles.has()
需要角色ID作为参数,而在这里,您要传入一个函数。)
The method I think you are looking for is Collection.exists (although this method is deprecated, if anyone can figure out a different way to go about this, please let me know).(我认为您正在寻找的方法是Collection.exists (尽管不建议使用此方法,但是如果有人可以找到其他解决方法,请告诉我)。)
Looking at the message.reply
in the then
function after banning, I see a message.user.id
.
(望着message.reply
在then
取缔后的功能,我看到一个message.user.id
。)
However, message.user
does not seem to be a valid property of the message object according to the docs.(但是,根据文档, message.user
似乎不是消息对象的有效属性。)
I assume that you would be referring to the user who was just banned, in which case you can reuse the user
or member
variable you previously defined.(我假设您是指刚刚被禁止的用户,在这种情况下,您可以重用先前定义的user
或member
变量。)
If you have further problems, feel free to comment back.
(如果您还有其他问题,请随时发表评论。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…