【发布时间】:2020-09-24 06:18:08
【问题描述】:
我正在编写一个不和谐的机器人并且我有一个变量。用户使用此命令查询车牌 Ex.(!qq TR 34)
我只想让车牌检查输入的数字,如果输入了字母或特殊字符,例如(!qq TR 34ü,) 和错误给用户请不要使用特殊字符或字母我该怎么做
if (countryID.length < 1)
return message.channel.sendEmbed(usageCommand);
else if (plaque.length == countryID.length)
return message.channel.sendEmbed(usageCommand);
else
【问题讨论】:
-
怎么样 isInteger(variable) ref:developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
-
isNaN 完成了我的工作
标签: javascript discord discord.js