Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const commandValues = Object.values(commands).join('|')
- const messeageRegex = new RegExp(`^(?!${commandValues}).+`, 'g')
- bot.onText(messeageRegex, (msg) => {
- Skills.sayRandomJoke(msg, bot)
- })
Add Comment
Please, Sign In to add comment