Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. /* Avoid command with double token */
  2.  
  3. 'use strict';
  4.  
  5. exports.setup = function (App) {
  6. App.parser.addTrigger('doubletoken', 'before', context => {
  7. if (context.originalMessage.charAt(1) in {"/": 1, "!": 1}) {
  8. return true;
  9. } else {
  10. return false;
  11. }
  12. });
  13. };
  14.  
  15. exports.destroy = function (App) {
  16. App.parser.removeTrigger('doubletoken', 'before');
  17. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement