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
say
command 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 shiro
to move into the folder that you just created. - Create a file named
.env
and fill it out as shown in.env.example
.
- Run
npm i --production
in the folder you cloned the bot. - Run
npm i -g pm2
to install PM2. - Run
pm2 start Shiro.js --name shiro
to 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 upgrade
to install the latest dependencies of your distro. - Run
apt install python
to install python. - Run
apt install libtool
so sodium can compile if necessary. (Optional) - Run
npm i --production
in the folder you cloned the bot. - Run
npm i -g pm2
to install PM2. - Run
pm2 start Shiro.js --name shiro
to 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_TOKEN
can be obtained at the Discord Developer Portal.OWNERS
is a comma-seperated list of Discord User IDs.SHIRO_PREFIX
is the prefix you want the bot to have. Likes?
.INVITE
is an invite link to a Discord server. The whole thing, not just the code.SHIRO_WEBHOOK_ID
is the ID of the webhook you want thewebhook
command to use.SHIRO_WEBHOOK_TOKEN
is the token of the webhook you want thewebhook
command 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_KEY
can be obtained at the Alpha Vantage website.GIPHY_KEY
can be obtained at the Giphy developer portal.GITHUB_ACCESS_TOKEN
can be obtained by creating an access token.GOOGLE_KEY
can be obtained at the Google Developer Console. Be sure to click "Enable APIs and Services" and enable the following API:GOV_KEY
can be obtained at the NASA Open APIs portal.IMGUR_KEY
can be obtained by Registering an Application at the Imgur website.OPENWEATHERMAP_KEY
can be obtained at the OpenWeatherMap website. Click "Get API Key" on the plan you want (probably Free).OSU_KEY
can 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_KEY
can be obtained at the TheCatAPI website.TWITTER_KEY
andTWITTER_SECRET
can be obtained at the Twitter developer portal.UNSPLASH_KEY
can be obtained at the Unsplash developer portal.USPS_USERID
can be obtained at the Web Tools API Portal.WATTPAD_KEY
can be obtained at the Wattpad developer portal.SHIRO_GITHUB_REPO_NAME
andSHIRO_GITHUB_REPO_USERNAME
are just the username and name of Shiro's repo on GitHub. For example,PeachyTree
for the username andshiro
for 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.