Git Product home page Git Product logo

makibot's Introduction

Discord GitHub release CI CD

makibot

makibot is the Discord bot for the makigas Discord server. It is not stable enough and it probably doesn't contain the most useful commands right now, but it works.

Requirements

  • Node.js >= 16.8.0.
  • A Discord application behaving as a bot.
  • A Discord server to put the bot in.

Setting up

Create a bot

Register a Discord bot if you haven't. Create a Discord app if you haven't done it yet, then create a Bot for your application using the Bot tab in the application page.

To make the bot join your server, you can use the OAuth2 URL Generator in the OAuth tab of your application page. Check the "bot" checkbox in the "Scopes" section and play with the permissions in the Bot Permissions box. You should automatically see an URL to make the application join a server where you have appropiate rights.

Set up the environment

The bot is controlled via environment variables. You can manually provide them when starting the application, you can use the proper environment settings if running through Docker or Docker-Compose. If you are running locally using Node.js, you might create a file called .env containing the environment variables, using .env.example as an example to follow.

Understood variables:

  • BOT_TOKEN: the authorization token to use with your bot. It is required in order to start the bot.
  • BOT_OWNER: the user ID of the main server administrator. While most commands and hooks understand the idea of "server mods", it is still required for some administrative actions to be issued by the server admin.
  • INVITE_TOKEN: if provided, will use this token to build the invite link when using the /invite command. Otherwise, it just links to http://discord.makigas.es.
  • HELPER_ROLE: the name of the role to use as helper in the server. Otherwise, it fallbacks to "helper".
  • MODS_ROLE: the name of the role to use for moderator members in the server. Otherwise, it fallbacks to "mods".
  • MUTE_ROLE: the name of the role to use for muted users. Otherwise, it fallbacks to "mute".
  • WARN_ROLE: the name of the role to use for warned users. Otherwise, it fallbacks to "warn".
  • LINKS_DISABLE_ROLE: the name of the role to use for members that are not allowed to post links. Otherwise, it fallbacks to "links-disabled"

Install and run

  • npm install
  • npm start

Contributing

Have an idea? Found a bug? This is an open source project, so you are free to contribute or provide knowledge if you want. See CONTRIBUTING.md for details, but here is the excerpt:

  • Send as many issues/PRs as you need, but please, only one topic per issue/PR.
  • Don't send a non-trivial PR without creating a tracking issue in the issue tracker first.
  • Don't work on top of trunk branch.

By submitting an issue or a PR – I'd dare to say that by pressing the Fork button as well –, you declare that you have read and agree with the contents of this document.

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.