Shiro is a open-source Discord bot coded in JavaScript with discord.js using the Commando command framework.
©2017-2021 PeachyTree
Shiro needs several permissions to be able to do what she does. Below is every permission Shiro asks for, and what commands you lose if you don't grant that permission.
- Create Instant Invite is needed to allow owners to join your server to test if needed.
- You lose no commands by turning this off, but you might hinder support.
- View Audit Log is not needed yet, but is something Shiro might utilize in the future.
- Change Nickname is not needed, but is included as a basic permission.
- View Channels is required for every single command to work.
- Send Messages is required for every single command to work.
- Manage Messages allows Shiro to use the
saycommand to delete your message, but the command will still work without it. - Embed Links is required to allow commands that send embeds to work. Too many commands to list use it.
- Attach Files is required to allow commands that send files to work. Too many commands to list use it.
- Read Message History is required to allow Shiro to react to messages alongside "Add Reactions".
- Mention @everyone, @here, and All Roles is not needed, but is included as a basic permission.
- Use External Emojis allows Shiro to use custom emoji in certain commands.
- While the commands benefit from it, it is not required for the commands to work.
- Add Reactions allows Shiro to use commands that add reactions to messages in certain commands.
- While the commands benefit from it, it is not required for the commands to work.
- "Read Message History" is also required to allow Shiro to react.
- 500+ commits
- 150+ commands
- 21,000+ lines of JavaScript
- 45,000+ lines of JSON data
- 4 years of development
- Make sure you have installed Node.js (you will need at least v15.0.0) and Git.
- Clone this repository with
git clone https://github.com/PeachyTree/shiro.git. - Run
cd shiroto move into the folder that you just created. - Create a file named
.envand fill it out as shown in.env.example.
- Run
npm i --productionin the folder you cloned the bot. - Run
npm i -g pm2to install PM2. - Run
pm2 start Shiro.js --name shiroto run the bot.
- Launch TERMINAL (can be found in Utilities folder)
- Run
xcode-select --install. - You should now see a software update popup asking you the following: "The xcode-select command requires the command line developer tools. Would you like to install the tools now?"
- Click on the Install button to confirm, then Agree to the License Agreement when requested (have fun reading through that). All the command line developer tools will be installed to the
/Library/Developer/CommandLineTools/directory. - After filling out the .env file, you can start the bot by running node shiro.js.
- Run
apt update. - Run
apt upgradeto install the latest dependencies of your distro. - Run
apt install pythonto install python. - Run
apt install libtoolso sodium can compile if necessary. (Optional) - Run
npm i --productionin the folder you cloned the bot. - Run
npm i -g pm2to install PM2. - Run
pm2 start Shiro.js --name shiroto run the bot.
Getting all the API keys for your .env file can be a pain on a
bot this big, I know. That's why I've compiled a list here of where
to go to get every single API key. Note, not all of these are free.
SHIRO_TOKENcan be obtained at the Discord Developer Portal.OWNERSis a comma-seperated list of Discord User IDs.SHIRO_PREFIXis the prefix you want the bot to have. Likes?.INVITEis an invite link to a Discord server. The whole thing, not just the code.SHIRO_WEBHOOK_IDis the ID of the webhook you want thewebhookcommand to use.SHIRO_WEBHOOK_TOKENis the token of the webhook you want thewebhookcommand to use.
Here's where things get LONG. If you're greeted with a log-in page when clicking any of these links, you'll need an account for that API. All are free unless otherwise stated.
ALPHA_VANTAGE_KEYcan be obtained at the Alpha Vantage website.GIPHY_KEYcan be obtained at the Giphy developer portal.GITHUB_ACCESS_TOKENcan be obtained by creating an access token.GOOGLE_KEYcan be obtained at the Google Developer Console. Be sure to click "Enable APIs and Services" and enable the following API:GOV_KEYcan be obtained at the NASA Open APIs portal.IMGUR_KEYcan be obtained by Registering an Application at the Imgur website.OPENWEATHERMAP_KEYcan be obtained at the OpenWeatherMap website. Click "Get API Key" on the plan you want (probably Free).OSU_KEYcan be obtained by signing up at the osu! API page. Whether this link takes you to the right page or not is hit-or-miss.THECATAPI_KEYcan be obtained at the TheCatAPI website.TWITTER_KEYandTWITTER_SECRETcan be obtained at the Twitter developer portal.UNSPLASH_KEYcan be obtained at the Unsplash developer portal.USPS_USERIDcan be obtained at the Web Tools API Portal.WATTPAD_KEYcan be obtained at the Wattpad developer portal.SHIRO_GITHUB_REPO_NAMEandSHIRO_GITHUB_REPO_USERNAMEare just the username and name of Shiro's repo on GitHub. For example,PeachyTreefor the username andshirofor the name.
This section is a bit different, as all of these keys are the same process. First, sign up for Imgur. Then, just go to your profile and make albums that contain the images for the command you want to use. Use the ID of that album (look at the URL) as the variable. Yes, you need to fill these albums yourself.
Total: SOON
Full command list coming soon...
- command-name: Command Description.
The bot is licensed under the GPL 3.0 license. See the file LICENSE for more
information. If you plan to use any part of this source code in your own bot, I
would be grateful if you would include some form of credit somewhere.