Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Avoid command with double token */
- 'use strict';
- exports.setup = function (App) {
- App.parser.addTrigger('doubletoken', 'before', context => {
- if (context.originalMessage.charAt(1) in {"/": 1, "!": 1}) {
- return true;
- } else {
- return false;
- }
- });
- };
- exports.destroy = function (App) {
- App.parser.removeTrigger('doubletoken', 'before');
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement