-
-
Notifications
You must be signed in to change notification settings - Fork 62
Setup Guide
Go to Carbon's Bot list and invite the bot.
This section is for running the bot locally on Windows. If you're on Mac it should be similar. I assume Linux users can figure it out.
Go to the downloads page on python.org and get the latest 2.7.X installer.
Open the installer that you downloaded. Make sure Install for all users
is selected, then continue.
Enable all of the options. Most importantly the "Add python.exe to Path" one:
Then install it and close the installer
This step isn't needed unless you added voice support
Next we need to download Visual Studio because it has a C++ compiler.
Go to the Microsoft Visual Studio website and click Download Community 2015
.
Open vs_community_ENU.exe
Check only the Common Tools for Visual C++ 2015
box like so:
Now install. This will take a long time.
Node.js is what will be used to run the bot.
Download Node.js 6.X from the website.
Open the Node.js Setup.
In the options, make sure Node.js runtime
npm package manager
and Add to PATH
are enabled.
After that install Node.js.
And install it. The website is http://git-scm.com and make sure you choose "for command prompt".
Next you'll need to download the bot and configure it.
Download the master branch and put the unzipped files in a new folder on your computer.
Next open up bot/config.json
and enter the correct information. The config guide can be found here.
Before running the bot you need to install the dependencies.
In the folder you put the files in, Shift+Right click
and select open command window here
.
In the command prompt type npm install
. If you finished all of the above you should be fine. You can ignore some of the errors.
The bot should now be ready!
Open a command prompt like above and type node BrussellBot.js
to start the bot.
For a better experience download cmder
and use that instead of cmd
No longer supported. If you really want to do this download the public branch and make any necessary modifications to update it.
Get it from here, using the installer for your operating system. Make sure to run heroku login
from the command line and enter your credentials.
Either clone this repo (git clone -b public --single-branch https://github.com/brussell98/BrussellBot.git
from the command line) or get the latest download from the releases page.
Install Node.js, Python 2.7.X, and Git
If you're using Linux, follow the instructions for installing Node.js here, following the instructions for 5.x
versions. Also if using Linux, find instructions to install Python and Git for your distro and follow them.
Shift-RightClick
in the folder that you downloaded and select Open command window here
. Then type npm install
and hit Enter
.
cd
to where you cloned the GitHub repo and type sudo npm install
. This will take a while.
- Edit
bot/config.json
to your liking, using the guide here. Make sure to leaveuse_env
asfalse
! - Type
heroku create
, which will create a new application with a random name. If you want to specify a name, typeheroku create your-name-here
. If it gives some error about it not being a git repository (if you downloaded BrussellBot from the releases page), typegit init
and thenheroku create
again. - To make sure that the changes you made to
bot/config.json
are included, typegit add .
andgit commit -m "Added credentials"
, with the latter command mentioning edits. If it gives an error about CRLF being replaced by LF or vice versa, typegit config --global core.autocrlf false
and hit Enter, then try again. If you get something asking about who you are, typegit config --global user.name "your name here"
andgit config --global user.email "your email here"
, then typegit commit --amend --reset-author
and save the file that pops up. - Send the changes off to Heroku by typing
git push heroku master
. Follow the output of that command and make sure that the deploy is successful. - It seems that the deploy only works for an hour before logging out. Time to fix that. Copy the below code snippet and paste it into the bottom of
BrussellBot.js
:
var http = require("http");
setInterval(function() {
http.get("http://sheltered-river-1376.herokuapp.com"); // insert your application's URL here
}, 1320000); //every 22 minutes to keep the bot from sleeping which breaks it
- Next, create a file called
index.js
with the following code in it:
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}).listen(80);
-
git add .
,git commit -m "added index.js, keepalive script"
,git push heroku master
, and you're... - Done! Make sure to test the bot out with a couple commands, including both normal and administrative.