/Kisaragi

Discord bot for searching anime pictures and playing music. There are other misc and utility commands as well.

Primary LanguageTypeScriptOtherNOASSERTION

Kisaragi Discord Bot

Best Girl

Update - 12/1/2022 Because of the discontinuation of the free heroku hosting plans, this bot is discontinued and will be offline indefinitely. If you know of another way to host a backend app for free, then feel free to open an issue about it.

This is my first programming project, a discord bot mainly to search anime pictures and websites, play music, and provide some server utilities. Invite the bot here!

Help

Double click on the same reaction to toggle a compact form of the help menu.

=>help - Open the help menu which lists all commands.

=>help command - Detailed help information, such as arguments, usage, and an example image.

=>help !category - Only posts the help menu page for that category.

=>help dm - Compact help list that is compatible in dm's.

Bugs/Feature Requests

Please let me know by submitting an issue or using the feedback command on the bot. I appreciate all ideas.

Self Hosting

The first step is to clone this repo to download all of the code. git clone <url> In the same directory, you can install all of the dependencies with the command: npm install

Next you need to create a bot application on Discord. Create a new application at: https://discord.com/developers/applications Create a bot under the bot tab, you can give it any name and profile picture that you wish. Rename the file named .env.example to .env - this file has all of your credentials, so it should never be shared. Add your token after the variable named TOKEN. For the variable OWNER_ID, put your own user ID. This is the person that is considered the bot owner and is the only person that can use bot developer commands. Filling out the rest of the file is relatively self-explanatory. For example, to use Twitter commands you will need credentials for Twitter's API. You can get this by googling "twitter api" and creating an application in their developer portal - it is the same for the other sites.

You can instantiate the database by restoring from the sql file that I provided in the self hosting tab. To avoid errors, you need to restore with the option "Do not save owner". The databse credentials should go in the PG_DATABASE, PG_PASSWORD, etc. variables. For redis use REDIS_URL, a new empty Redis database is fine.

The bot uses a lot of custom emojis, so you need to make sure that it can find all of them. You need to create a bunch of Discord servers (around 5-6) and add the bot to all of them. It's important to note that you must be the owner of the servers, because the bot only checks for emojis in the servers that the bot owner owns. All of the emojis are in the self hosting folder. The URL to add this bot is the following, you need to replace CLIENT_ID with the client ID of your bot:

https://discord.com/oauth2/authorize?client_id=CLIENT_ID&permissions=2113793271&scope=bot

In events/ready.ts, remove the following line: this.discord.postGuildCount() Since your version of the bot will not be on any bot lists.

Finally, you can start the bot with the following command: npm start

That's all!