Code Monkey home page Code Monkey logo

kirino's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.