daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var lastAntiChris = 0;
  2. function antiChris(chat) {
  3.   if (chat.user.userInfo.userId == "55f82ebe44809b0300f88693" && //Chris
  4.       chat.message.search("!shootduck") == 0 )
  5.   {
  6.     if (Date.now() - lastAntiChris >= 500) {
  7.       var prevChat = Dubtrack.room.chat._messageInputEl.val();
  8.       Dubtrack.room.chat._messageInputEl.val("Chris try again in 1 second(s). https://media.giphy.com/media/5ftsmLIqktHQA/giphy.gif");
  9.       Dubtrack.room.chat.sendMessage();
  10.       Dubtrack.room.chat._messageInputEl.val(prevChat);
  11.       lastAntiChris = Date.now();
  12.     }
  13.   }
  14. }
  15. Dubtrack.Events.bind("realtime:chat-message", antiChris);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top