Advertisement
Forblaze

node-steam-chat-bot

Sep 24th, 2014
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //#!/bin/node -
  2. function $(arg){ return arg; }
  3.  
  4. var ChatBot = require('steam-chat-bot').ChatBot;
  5.  
  6. var forblaze = '76561198054977425';
  7. var tess = '76561198017004968';
  8. var jones = '76561198008597087';
  9. var ashley = '76561198002648706';
  10.  
  11.  
  12. var myBot = new ChatBot('Payday2ModBot', 'password', {
  13.     logFile: true,
  14.     autoReconnect: true,
  15.     autojoinFile: 'bot.username.autojoin',
  16.     babysitTimer: 300000,
  17.     sentryFile: 'bot.username.sentry'
  18. });
  19.  
  20. myBot.addTriggers([
  21. {
  22.     name: 'MuteCommand',
  23.     type: 'BotCommandTrigger',
  24.     options: {
  25.     matches: ['!mute'],
  26.     exact: true,
  27.     users: [forblaze, tess, jones, ashley],
  28.     callback: function(bot) { bot.mute(); }
  29. }},
  30. {
  31.     name: 'UnmuteCommand',
  32.     type: 'BotCommandTrigger',
  33.         options: {
  34.         matches: ['!unmute'],
  35.         exact: true,
  36.         users: [forblaze, tess, jones, ashley],
  37.         callback: function(bot) { bot.unmute(); }
  38. }},
  39. {
  40.     name: 'Help',
  41.     type: 'ChatReplyTrigger',
  42.     options: {
  43.         matches: ['!commands'],
  44.         responses: ['!crimefest, !free, !leavegroup, !joingroup, !announcements, !forum, !general, !lfg, !suggestions, !bugreport\n\n Questions/comments/concerns should be forwarded to Forblaze (http://steamcommunity.com/profiles/76561198054977425)'],
  45.         exact: true,
  46.         timeout: 30000,
  47. }},
  48. {
  49.     name: 'Warn',
  50.     type: 'ChatReplyTrigger',
  51.     options: {
  52.         matches: ['!warn'],
  53.         responses: ['Listen to Ashley (http://steamcommunity.com/profiles/76561198002648706)'],
  54.         exact: true,
  55.         timeout: 30000,
  56. }},
  57. {
  58.     name: 'CrimeFest',
  59.     type: 'ChatReplyTrigger',
  60.     options: {
  61.         matches: ['!crimefest'],
  62.         responses: ['CRIMEFEST begins on October 18th, more information can be found here: http://www.overkillsoftware.com/crimefest/'],
  63.         exact: true,
  64.         timeout: 30000,
  65. }},
  66. {
  67.     name: 'Free Payday',
  68.     type: 'ChatReplyTrigger',
  69.     options: {
  70.         matches: ['!free'],
  71.         responses: ['PAYDAY: The Heist will be free on October 18th, during crimefest. Note that this is the first game only, and DLC is not included. PAYDAY 2 will not be free. \n\nMore information can be found at http://www.overkillsoftware.com/crimefest/'],
  72.         exact: true,
  73.         timeout: 30000,
  74. }},
  75. {
  76.     name: 'Leave Group',
  77.     type: 'ChatReplyTrigger',
  78.     options: {
  79.         matches: ['!leavegroup'],
  80.         responses: ['Official groups no longer show up under your list of groups, and must now be left through the Stop Following button on the announcements page. http://i.imgur.com/PlX6Ijk.png? \n\nPayday 2s announcements page can be found here: http://steamcommunity.com/app/218620/announcements'],
  81.         exact: true,
  82.         timeout: 30000,
  83. }},
  84. {
  85.     name: 'Join Group',
  86.     type: 'ChatReplyTrigger',
  87.     options: {
  88.         matches: ['!joingroup'],
  89.         responses: ['You can join the official group by pressing the join button on the groups page. http://i.imgur.com/aTqNWHi.png?2\n\nThe official group can be found here: http://steamcommunity.com/games/218620/\n\nNote that you still need to buy the items in game (with in game money), and many of them have level requirements. If the join button is not there, it is likely that youre already a member'],
  90.         exact: true,
  91.         timeout: 30000,
  92. }},
  93. {
  94.     name: 'Announcements',
  95.     type: 'ChatReplyTrigger',
  96.     options: {
  97.         matches: ['!announcements'],
  98.         responses: ['http://steamcommunity.com/app/218620/announcements'],
  99.         exact: true,
  100.         timeout: 30000,
  101. }},
  102. {
  103.     name: 'Discussions',
  104.     type: 'ChatReplyTrigger',
  105.     options: {
  106.         matches: ['!forum'],
  107.         responses: ['http://steamcommunity.com/app/218620/discussions'],
  108.         exact: true,
  109.         timeout: 30000,
  110. }},
  111. {
  112.     name: 'General',
  113.     type: 'ChatReplyTrigger',
  114.     options: {
  115.         matches: ['!general'],
  116.         responses: ['http://steamcommunity.com/app/218620/discussions/8/'],
  117.         exact: true,
  118.         timeout: 30000,
  119. }},
  120. {
  121.     name: 'LFG',
  122.     type: 'ChatReplyTrigger',
  123.     options: {
  124.         matches: ['!lfg'],
  125.         responses: ['http://steamcommunity.com/app/218620/discussions/11/'],
  126.         exact: true,
  127.         timeout: 30000,
  128. }},
  129. {
  130.     name: 'Suggestions',
  131.     type: 'ChatReplyTrigger',
  132.     options: {
  133.         matches: ['!suggestions'],
  134.         responses: ['http://steamcommunity.com/app/218620/discussions/10/'],
  135.         exact: true,
  136.         timeout: 30000,
  137. }},
  138. {
  139.     name: 'Bug Reporting',
  140.     type: 'ChatReplyTrigger',
  141.     options: {
  142.         matches: ['!bugreport'],
  143.         responses: ['http://steamcommunity.com/app/218620/discussions/14/'],
  144.         exact: true,
  145.         timeout: 30000,
  146. }},
  147.  
  148.     { name: 'ModerateTrigger',     type: 'ModerateTrigger',     options: { users:[forblaze, tess, jones, ashley] } },
  149.     { name: 'BanTrigger',          type: 'BanTrigger',          options: { users:[forblaze, tess, jones] } },
  150.     { name: 'KickTrigger',         type: 'KickTrigger',         options: { users:[forblaze, tess, jones, ashley] } },
  151.     { name: 'UnbanTrigger',        type: 'UnbanTrigger',        options: { users:[forblaze, tess, jones] } },
  152.     { name: 'UnmoderateTrigger',   type: 'UnmoderateTrigger',   options: { users:[forblaze, tess, jones, ashley] } },
  153.  
  154. ])
  155.  
  156. myBot.connect();
  157. var details = myBot.getTriggerDetails();
  158. myBot.clearTriggers();
  159. myBot.addTriggers(details);
  160.  
  161. //myBot.joinChat('103582791433980119') //payday 2
  162. //myBot.joinChat('103582791435461936') //test chat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement