如何检查用户是否已存在于数据库中

时间:2020-10-14 18:33:02

标签: discord.js

我有此代码(如下所述),只要它检查数据库中是否有author.id,它就会兑现。有人可以帮忙吗?

let blacklist = new db.crearDB("blacklist")     
          let CompBlacklist = await blacklist.obtener('Blacklist')
            
          if (CompBlacklist.includes(message.author.id)) return message.channel.send('Yeah.')
            
          await message.react('✅');
          if (server.channels.exists("name", "ticket-" + message.author.id)) {
          console.log("a")
          return SendMessageTicket(message);

我的错误:

(UnhandledPromiseRejectionWarning: TypeError: CompBlacklist.includes is not a function)

0 个答案:

没有答案