Coder Social home page Coder Social logo

pascalharp / crossroadsbot Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 2.0 573 KB

A discord bot to manage trainings and sign ups for the Crossroads Inn Guild Wars 2 community

License: MIT License

PLpgSQL 0.56% Rust 99.19% Dockerfile 0.10% Shell 0.15%
gw2 raids community

crossroadsbot's Introduction

Crossroads

Crossroads Inn signup bot

Setup

Following a non config file approach required tokens and paths are passed to the application with environment variables. To not pollute your environment while developing check out the .env file section below

Docker Compose setup

Copy docker-compose.yml.example to docker-compose.yml like so: cp docker-compose.yml.example docker-compose.yml. Then edit docker-compose.yml and fill the missing fields with your discord bot token and your discord guild and role id's. At last start the bot and the postgres database in detached mode with docker-compose up -d.

Environment variables

DATABASE_URL

URL to postgres database.
Example: DATABASE_URL=postgres://username:password@localhost/crossroad

DISCORD_TOKEN

The discord bot token to be used. Check here for more information.

APPLICATION_ID

The application id of the bot. This is required to use buttons

MAIN_GUILD_ID

The main discord guild id the bot will be used on. This is also the discord where role permissions are taken from

EMOJI_GUILD_ID

The discord guild the bot will load and use custom emojis from.

SQUADMAKER_ROLE_ID

The discord role id for MAIN_GUILD_ID that has access to all commands

RUST_LOG

Amount of LOG verbosity. Options are: warn, info, debug

.env file

A .env file can be placed in the root directory of the project that will be sourced when the application is started and for all tests.
Example ./.env file content:

DATABASE_URL=postgres://username:password@localhost/crossroad
DISCORD_TOKEN=AVERYLONGSECRETTOKENTHATSHOULDNEVERBEMADEPUBLIC
MAIN_GUILD_ID=111222333444555666
EMOJI_GUILD_ID=111222333444555666
SQUADMAKER_ROLE_ID=666777888999000111
RUST_LOG=info

crossroadsbot's People

Contributors

pascalharp avatar salcatroppa avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

salcatroppa

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.