Mouse Bot is a Discord bot for Star Wars: Galaxy of Heroes players guilds and servers.
I started Mouse Bot as a side project mostly for myself. It started off with just the dailies command. Then my guild began to use it more often when I created the convert command. Now I’m happy to say that Mouse Bot 2.0 has 22 different commands ranging from game to Discord server moderation commands. I am striving to make Mouse Bot the definitive bot for SW:GoH and I hope you enjoy using him as much as I do!
I made Mouse Bot publicly available so that people can host him on their own servers if they want to. I also highly encourage people to modify and improve him. Create new commands that help players, guilds or the community in general. (If you do make any modifications or additions, please let me know so I can share them with everyone!)
This readme will explain how to install and host Mouse Bot on your own home computer or Raspberry Pi server. This is not a user manual for the bot. This is the user manual.
I have uploaded the code onto GitHub for anyone that is looking to edit code or add commands on their own. If you want to do that, the following instructions should help you get him up and running.
If you do not want to go through the hassle of installing everything and hosting Mouse Bot on your own server, then you can simply use the following link to add him to your server. Add Mouse Bot to your server.
Please note, this is still beta. I am still working out the kinks and if he goes offline for some time and I don’t catch it, just let me know and I will get him back up.
- Command Prompt or Terminal
- A code editor: Atom, VS Code, or Sublime Text
- Git (Mac|Windows|Linux)
- Node.js Version 8+
- Your bot’s token (This is a good guide for getting your bot’s token)
Using the terminal inside the directory you want to put the folder, type:
git clone https://github.com/rmgirardin/mouse-bot.git
Then go into the mouse-bot folder with cd mouse-bot and run npm install. This will install all the node modules you need to run the bot.
Rename config.js.example to config.js
With your code editor, open the config.js file:
- Enter your bot’s token within the empty quotation marks after
"token": - Enter your Discord ID within the empty quotation marks after
"admins": - To get your Discord ID follow these instructions
In the command prompt within the root project folder directory, you can run the bot with node index.js. Alternatively you can use node and drag the folder path into the terminal.
If you decide to use PM2, you do not need to do this. See below for instruction on how to use PM2.
Now you just need to invite your bot to your server. You can generate a full OAuth Link here. The Client ID can be found the same place you found your bot token.
Install PM2 with npm i pm2 -g
To begin running your app with PM2, just type:
pm2 start index.js -n mousebot
All your PM2 commands might require you to use sudo before the command if you are using a Mac or Linux.
We've given the app the name mousebot with -n mousebot. This will make it easier to call in the future.
Now finish the setup with pm2 startup and follow the instructions. If you are on Windows, you will need to install pm2-windows-startup.
Mouse Bot should now run even when you close the terminal. You can restart the app with pm2 restart mousebot. You can also use pm2 monit to monitor the app and watch real-time log.
You can add commands by creating new files in the commands folder (new-command-name.js). To use new commands, you’ll need to restart the bot by hitting ctrl+c and retyping (or hitting the up arrow key) node index.js. If you are using PM2, you can just type pm2 restart mousebot.
If you are just editing already loaded commands while your bot is running, as the bot owner, you can use the reload <command-name> command within Discord to reload commands without restarting your bot.
The first way you can contribute is by forking this repo or creating a pull request and making changes that improve or expand the bot. Please don't hesitate!
If you don't want to code, but you want to contribute, you can always donate. This bot takes a lot of time to create and maintain.
If you need help, you can always ask me. I’m available on Discord: Necavit#0540 or through email: support@girard.in
If you find any bugs or typos, please let me know! I hope you enjoy this bot as much as I do!
A big shout-out to the Guide Bot created by Evie and York. Without their Guide Bot, I would still have a simple little one-file bot.
The developer of this application does not have any affiliation with the EA, EA Capital Games, Disney, Lucasfilm LTD or swgoh.gg