Advertisement
Guest User

BotScript

a guest
Jan 22nd, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function () {
  2.  
  3.     // Change this to your GitHub username so you don't have to modify so many things.
  4.     var fork = "basicBot";
  5.  
  6.     // Define our function responsible for extending the bot.
  7.     function extend() {
  8.         // If the bot hasn't been loaded properly, try again in 1 second(s).
  9.         if (!window.bot) {
  10.           return setTimeout(extend, 1 * 1000);
  11.         }
  12.  
  13.         // Precaution to make sure it is assigned properly.
  14.         var bot = window.bot;
  15.  
  16.         // Load custom settings set below
  17.         bot.retrieveSettings();
  18.  
  19.         //Extend the bot here, either by calling another function or here directly.
  20.  
  21.         // You can add more spam words to the bot.
  22.         var spamWords = ['spam1', 'spam2', 'spam3', 'spam4'];
  23.         for (var i = 0; i < spamWords.length; i++) {
  24.           window.bot.chatUtilities.spam.push(spamWords[i]);
  25.         }
  26.  
  27.         // Example code for a bot command:
  28.         bot.commands.baconCommand = {
  29.           command: 'bacon',  // The command to be called. With the standard command literal this would be: !bacon
  30.           rank: 'user', // Minimum user permission to use the command
  31.           type: 'exact', // Specify if it can accept variables or not (if so, these have to be handled yourself through the chat.message
  32.           functionality: function (chat, cmd) {
  33.             if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0);
  34.             if (!bot.commands.executable(this.rank, chat)) return void (0);
  35.             else {
  36.               API.sendChat("/me Bacon!!!");
  37.             }
  38.           }
  39.         };
  40.  
  41. wootCommand: {
  42.                 command: 'woot',
  43.                 rank: 'user',
  44.                 type: 'exact',
  45.                 functionality: function(chat, cmd) {
  46.                     if (this.type === 'exact' && chat.message.length !== cmd.length) return void(0);
  47.                     if (!basicBot.commands.executable(this.rank, chat)) return void(0);
  48.                     else {
  49.                         $('#woot').click(woot!);
  50.                     }
  51.                 }
  52.             },
  53.         // Load the chat package again to account for any changes
  54.         bot.loadChat();
  55.  
  56.       }
  57.  
  58.     //Change the bots default settings and make sure they are loaded on launch
  59.  
  60.     localStorage.setItem("basicBotsettings", JSON.stringify({
  61.         botName: 'basicBot',
  62.         language: 'english',
  63.         chatLink: 'https://rawgit.com/basicBot/source/master/lang/en.json',
  64.         scriptLink: 'https://rawgit.com/basicBot/source/master/basicBot.js',
  65.         roomLock: true, // Requires an extension to re-load the script
  66.         startupCap: 1, // 1-200
  67.         startupVolume: 0, // 0-100
  68.         startupEmoji: false, // true or false
  69.         autowoot: false,
  70.         autoskip: false,
  71.         smartSkip: true,
  72.         cmdDeletion: true,
  73.         maximumAfk: 120,
  74.         afkRemoval: true,
  75.         maximumDc: 60,
  76.         bouncerPlus: true,
  77.         blacklistEnabled: true,
  78.         lockdownEnabled: false,
  79.         lockGuard: false,
  80.         maximumLocktime: 10,
  81.         cycleGuard: true,
  82.         maximumCycletime: 10,
  83.         voteSkip: false,
  84.         voteSkipLimit: 10,
  85.         historySkip: false,
  86.         timeGuard: true,
  87.         strictTimeGuard: true,
  88.         maximumSongLength: 10,
  89.         autodisable: false,
  90.         commandCooldown: 30,
  91.         usercommandsEnabled: true,
  92.         thorCommand: false,
  93.         thorCooldown: 10,
  94.         skipPosition: 3,
  95.         skipReasons: [
  96.             ['theme', 'This song does not fit the room theme. '],
  97.             ['op', 'This song is on the OP list. '],
  98.             ['history', 'This song is in the history. '],
  99.             ['mix', 'You played a mix, which is against the rules. '],
  100.             ['sound', 'The song you played had bad sound quality or no sound. '],
  101.             ['nsfw', 'The song you contained was NSFW (image or sound). '],
  102.             ['unavailable', 'The song you played was not available for some users. ']
  103.         ],
  104.         afkpositionCheck: 15,
  105.         afkRankCheck: 'ambassador',
  106.         motdEnabled: false,
  107.         motdInterval: 0,
  108.         motd: 'Welcome to CORE NATION! Respect the people and the mods. Do this and we cool.',
  109.         filterChat: true,
  110.         etaRestriction: false,
  111.         welcome: true,
  112.         opLink: null,
  113.         rulesLink: null,
  114.         themeLink: null,
  115.         fbLink: null,
  116.         youtubeLink: null,
  117.         website: null,
  118.         intervalMessages: [],
  119.         messageInterval: 5,
  120.         songstats: true,
  121.         commandLiteral: '!',
  122.         blacklists: {
  123.             NSFW: 'https://rawgit.com/basicBot/custom/master/blacklists/NSFWlist.json',
  124.             OP: 'https://rawgit.com/basicBot/custom/master/blacklists/OPlist.json',
  125.             BANNED: 'https://rawgit.com/basicBot/custom/master/blacklists/BANNEDlist.json'
  126.         }
  127.     }));
  128.  
  129.     // Start the bot and extend it when it has loaded.
  130.     $.getScript("https://rawgit.com/basicBot/source/master/basicBot.js", extend);
  131.  
  132. }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement