diff --git a/handlers/commands/index.js b/handlers/commands/index.js index ab515a4..5bf5149 100644 --- a/handlers/commands/index.js +++ b/handlers/commands/index.js @@ -50,7 +50,6 @@ composer.command('user', deleteMessage, userHandler); composer.command('ban', deleteMessage, banHandler); composer.command('unban', deleteMessage, unbanHandler); composer.command('report', deleteMessage, reportHandler); -composer.hears(/^@admins?\s?/i, deleteMessage, reportHandler); composer.command('staff', deleteMessage, staffHandler); composer.command('link', deleteMessage, linkHandler); composer.command('groups', deleteMessage, groupsHandler); diff --git a/handlers/regex/index.js b/handlers/regex/index.js index c30d623..d34a861 100644 --- a/handlers/regex/index.js +++ b/handlers/regex/index.js @@ -1,10 +1,11 @@ 'use strict'; -const { compose } = require('telegraf'); +const { compose, hears } = require('telegraf'); /* eslint-disable global-require */ module.exports = compose([ + hears(/^(?:!report|[@!]admins?)\b/i, require('../commands/report')), require('./runCustomCmd'), require('./groupLinker'), ]);