basicbot / custom Goto Github PK
View Code? Open in Web Editor NEWHow to customize basicBot, a not so basic bot for plug.dj
How to customize basicBot, a not so basic bot for plug.dj
I can't get the blacklists to load from my repo, not can I get the bot to remember lists from refresh to refresh.
I'm trying to use new-added commands but they just do nothing.
I've updated the language file and the bot isn't using the updated messages?
Try to keep numbers integers: no decimals. Strings go between " ", if you want to use " in your string, use ". Booleans are either 'true' or 'false', without the '.
"language": choose one of the supported language packs, if no valid language is found, it will use the standard pack or a specified pack, type: string
"chatLink": link to a json file containing a translated chat pack, type: string
"maximumAfk": the amount of minutes a user can be afk for the afkCheck if it's enabled, type: a number
"afkRemoval": turn afkCheck on or off, type: boolean
"maximumDc": users that disconnected not longer than this amount of minutes ago, can get their spot back, type: a number
"bouncerPlus": turn the bouncer+ mode on or off, type: boolean
"lockdownEnabled": turn lockdown on or off, lockdown means that only staff can chat, leave it false
"lockGuard": turn the lockguard on or off, lockguard makes sure the waitlist isn't locked longer than the maximum allowed time, type: a boolean: true/false
"maximumLocktime": maximum time the waitlist can be locked if lockguard is enabled, type: a number
"cycleGuard": turn the cycleguard on or off, cycleguard makes sure DJ cycle isn't on longer than the allowed amount of minutes, type: boolean
"maximumCycletime": maximum time DJ cycle can be enabled if cyleguard is enabled, type: a number
"timeGuard": turn the timeguard on or off, timeguard makes sure songs are not longer than the specified limit, if they are longer they are skipped immediately, type: boolean
"maximumSongLength": maximum length of a track if timeguard is enabled, type: a number
"autodisable": if enabled, the bot sends out !afkdisable and !joindisable every hour, this disables afkmessages and autojoining on plugcubed, type: boolean
"commandCooldown": the cooldown in seconds for commands for users (there will always be a few seconds cooldown to prevent spamming the servers), type: a number
"usercommandsEnabled": turn commands for users on or off, type: boolean
"lockskipPosition": the position to which !lockskip adds users back to the waitlist, type: a number
"lockskipReasons": possible reasons to add to !lockskip, format like this: [ ["reason1", "explanation1"], ["reason2", "explanation2"], ... ["reasonX", "explanationX"] ]
"afkpositionCheck": only people below this waitlist position will be checked for afk, type: a number
"afkRankCheck": only people below and with this rank will be checked for afk, possible ranks: "user", "residentdj", "bouncer", "manager", "cohost", "host", "ambassador", "admin" eg. "bouncer" will check all grey users, residentdj's and bouncers afk
"motdEnabled": Message of the Day, best to be left false and to be enabled and set using the commands, MotD displays a message every X songs. Use it for temporary imporant messages, type: boolean
"motdInterval": standard interval for the MotD, every X songs, type: a number
"motd": standard MotD, best to set using the !motd command, type: string
"filterChat": turns the chatfilter on or off, the filter checks for a range of invalid messages like just . 's, excessive caps, asking for skips, some spam and asking for fans, type: boolean
"etaRestriction": enables the restriction on !eta, the restriction means that grey users can only use it once every hour, this would be used to prevent spamming the command, type: boolean
"welcome": turn a welcome message for users on or off, type: boolean
"opLink": an optional link to a list of OverPlayed songs, leave it null to leave it disabled, type: string
"rulesLink": an optional link to a list of rules, leave it null to leave it disabled, type: string
"themeLink": an optional link to the room's theme and allowed genres, leave it null to leave it disabled, type: string
"fbLink": an optional link to a Facebook page, leave it null to leave it disabled, type: string,
"youtubeLink": an optional link to a youtube, leave it null to leave it disabled, type: string,
"website": an optional link to a website, leave it null to leave it disabled, type: string,
"intervalMessages": an array of messages displayed every X songs, leave it empty to not have any default messages, format: ["message 1", "message 2", "message 3"]
"messageInterval": the interval X for the standard messages, type: a number
"songstats": toggle message with statistics for the previous song, type: boolean
"commandLiteral": symbol used to start commands, type: string
"blacklists": list of blacklists and a link to their sources or a function to set them into the bot, see the readme for a more detailed how-to, type: string or function
Any solution to this? Many people dont like it . I havent tried properly but any link with https gets removed
(function () {
// Change this to your GitHub username so you don't have to modify so many things.
var fork = "2men23";
// Define our function responsible for extending the bot.
function extend(1) {
// If the bot hasn't been loaded properly, try again in 1 second(s).
if (!window.bot) {
return setTimeout(extend, 1 * 1000);
}
// Precaution to make sure it is assigned properly.
var bot = window.bot;
// Load custom settings set below
bot.retrieveSettings(https://github.com/2men23/custom/blob/master/extension.js);
//Extend the bot here, either by calling another function or here directly.
// You can add more spam words to the bot.
var spamWords = ['spam1', 'spam2', 'spam3', 'spam4'];
for (var i = 0; i < spamWords.length; i++) {
window.bot.chatUtilities.spam.push(spamWords[i]);
}
// Example code for a bot command:
bot.commands.baconCommand = {
command: 'bacon', // The command to be called. With the standard command literal this would be: !bacon
rank: 'user', // Minimum user permission to use the command
type: 'exact', // Specify if it can accept variables or not (if so, these have to be handled yourself through the chat.message
functionality: function (chat, cmd) {
if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0);
if (!bot.commands.executable(this.rank, chat)) return void (0);
else {
API.sendChat("/me Bacon!!!");
}
}
};
// Load the chat package again to account for any changes
bot.loadChat(en.json);
}
//Change the bots default settings and make sure they are loaded on launch
localStorage.setItem("basicBotsettings", JSON.stringify({
botName: "animeFan#1",
language: "english",
chatLink: "https://rawgit.com/basicBot/source/master/lang/en.json",
scriptLink: "https://rawgit.com/basicBot/source/master/basicBot.js",
roomLock: false, // Requires an extension to re-load the script
startupCap: 10, // 1-200
startupVolume: 100, // 0-100
startupEmoji: true, // true or false
autowoot: true,
autoskip: false,
smartSkip: true,
cmdDeletion: true,
maximumAfk: 10,
afkRemoval: true,
maximumDc: 60,
bouncerPlus: true,
blacklistEnabled: true,
lockdownEnabled: false,
lockGuard: false,
maximumLocktime: 10,
cycleGuard: true,
maximumCycletime: 10,
voteSkip: true,
voteSkipLimit: 10,
historySkip: true,
timeGuard: true,
maximumSongLength: 7,
autodisable: false,
commandCooldown: 30,
usercommandsEnabled: true,
thorCommand: false,
thorCooldown: 10,
skipPosition: 3,
skipReasons: [
['theme', 'This song does not fit the room theme. '],
['op', 'This song is on the OP list. '],
['history', 'This song is in the history. '],
['mix', 'You played a mix, which is against the rules. '],
['sound', 'The song you played had bad sound quality or no sound. '],
['nsfw', 'The song you contained was NSFW (image or sound). '],
['unavailable', 'The song you played was not available for some users. ']
],
afkpositionCheck: 15,
afkRankCheck: 'ambassador',
motdEnabled: false,
motdInterval: 5,
motd: 'welcome',
filterChat: true,
etaRestriction: false,
welcome: true,
opLink: string (),
rulesLink: string ('https://animearmy-plug-dj.weebly.com'),
themeLink: string ('https://animearmy-plug-dj.weebly.com'),
fbLink: string ('https://www.facebook.com/animearmy.plug.dj'),
discordLink: string ('https://discord.gg/JYNrCQC'),
youtubeLink: null,
website: string ('https://animearmy-plug-dj.weebly.com'),
intervalMessages: [5],
messageInterval: 5,
songstats: true,
commandLiteral: '!',
blacklists: {
NSFW: 'https://rawgit.com/basicBot/custom/master/blacklists/NSFWlist.json',
OP: 'https://rawgit.com/basicBot/custom/master/blacklists/OPlist.json',
BANNED: 'https://rawgit.com/basicBot/custom/master/blacklists/BANNEDlist.json'
}
},));
// Start the bot and extend it when it has loaded.
$.getScript("https://github.com/2men23/custom/blob/master/extension.js", extend);
}).call(this);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.