CypElf / Kirino

A multi-purpose, programming oriented Discord bot.

Home Page:https://www.kirino.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kirino

License CI status Discord

Description

Kirino is a multi-purpose, programming oriented Discord bot written in TypeScript with discord.js, featuring commands for programming languages execution, data format manipulations, utility and administration tools, and a nice XP system, available in English and French.

How to host

First, clone this repository and place it wherever you want.

$ git clone https://github.com/CypElf/Kirino.git

Create a copy of the file .env.template and rename it .env. Open it, and fill it with the values you will be using.

The following environment variables are mandatory:

  • KIRINO_TOKEN : This should be set to your bot token. Without it, the bot will not be able to start and connect to Discord.
  • CLIENT_ID : This should be set to your bot application ID. It is required to register the slash commands.
  • DEBUG_SERVER_ID : You can put here any server ID you want. Your bot should be a member of this server, and this is where the commands will be available if you register them for debug.

The following environment variables are optional, but needed for some features of the bot to work:

  • API_TOKEN : You can place whatever value here, but it should remain secret. This value is used to authenticate incoming requests to the XP API, and should be placed in the Authorization header. If missing, the XP API feature is disabled and not started.
  • INVITE_LINK : You can set this to the link used to invite your bot to a server. If missing, the invite command return a message saying that the invitation link is not available.
  • OWNER_ID : Set it to your own account user ID. It is only used for the donation command, to fetch your profile picture and display it in the corner of the embed. If missing, your profile picture will not be added to the embed when using this command.

That being done, you need to install the bot dependencies. Using yarn is recommended, but you can use npm instead if you prefer.

$ yarn install

Next, compile the project by running the build script provided from the package.json. The TypeScript source files will be transpiled to JavaScript and placed in a dist folder.

$ yarn build

Before starting the bot, you need to register all the slash commands for the users to see them in their Discord clients. You can use the registerProd script for that.

Note that this should be used only to register production ready commands, because all users will be able to see them and the registered commands are not propagated instantaneously to all clients.

$ yarn registerProd

If you want to register your commands only on one specific server for debug purposes, or if you have to register your commands multiple times in a small amount of time while working on them, you need to register your commands with the registerDebug script.

$ yarn registerDebug

The only thing left to do is to start the bot with the start command.

$ yarn start

Once you see the message Connection to Discord established in the output, the bot is online and ready to be used.

Getting help

If you have questions or need help with something, you can join the support server and ask in the #help-support channel.
Also, if you want to stay informed about the project and the changes applied to Kirino over time, you might want to keep an eye on the #news and #kirino-changelog channels, or subscribe another channel elsewhere to them.

Support the project

If you want to support me, the best way is to add Kirino to your servers, and leave a star on this repository. It would be highly appreciated.

Credits

Copyright (C) 2018 - 2024 Elf
This project is distributed with a GPLv3 license.

About

A multi-purpose, programming oriented Discord bot.

https://www.kirino.xyz/

License:GNU General Public License v3.0


Languages

Language:TypeScript 100.0%