Git Product home page Git Product logo

chaos-rings-bot's Introduction

About

A simple Discord application (slash command) that overlays a ChaosDAO ring on top of user-provided image based on the user's role.

How it works

  1. The user types /ring in a channel.
  2. A form with a field for attachment is displayed.
  3. The user adds a file and sends.
  4. The app responds with progress message.
  5. A few seconds later the app responds with an image.

Requirements

The application requires the following environment variables to be set:

  • Discord token - a token obtained when the discord application was linked to a bot in the Discord's dashboard
    • The way Apps work they have to be "linked" to a bot. You have to add a bot under your Application but you don't need to assign it any permissions at all.
    • To generate an invitation link for the app, go to "URL Generator" under "OAuth2" and generate a url with just the applications.commands scope selected.
    • Use this link to add the app to any of your servers.
  • Role IDs - actual Discord user Roles
    • One for each of Frens, Regulars and DAOists
  • Image Paths - the ring images used as overlays
    • One file for each of Frens, Regulars and DAOists

These names of the environment variables (and example values) are:

CHAOSRING_DAOISTS=/path/to/daoists_ring.png
CHAOSRING_FRENS=/path/to/frens_ring.png
CHAOSRING_REGULARS=/path/to/regulars_ring.png
DAO_ROLE_DAOIST=<role_id>
DAO_ROLE_FREN=<role_id>
DAO_ROLE_REGULAR=<role_id>
DISCORD_TOKEN=<token>

This bot also supports .env files using the same name of variables. A .env.sample file is provided. Rename it to .env once you have filled out the values.

Docker image

docker build --platform linux/x86_64 -t chaosbot .

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.