UNPKG

node-red-contrib-chatbot

Version:

REDBot a Chat bot for a full featured chat bot for Telegram, Facebook Messenger and Slack. Almost no coding skills required

15 lines (12 loc) 321 B
const tableExists = async (name, sequelize) => { try { await sequelize.query(`SELECT * FROM ${name}`); return true; } catch(e) { return false; } }; const isEmptyDatabase = async (sequelize) => { return !(await tableExists('admins', sequelize)); }; module.exports = { tableExists, isEmptyDatabase };