Skip to content
/ o2m Public

An Elixir Discord bot used to organize and run blind tests (and more).

License

Notifications You must be signed in to change notification settings

papey/o2m

Repository files navigation

O2M, Orgie 2 Metal

Build & Test

O2M is an Elixir Discord bot. It can :

  • organize and run blind tests
  • fetch data about metal bands (baked up by Metalorgie)
  • monitor podcasts shows publications on Ausha or Anchor.

Getting Started

Prerequisites

Installing

Get O2M

From source

Clone this repo and run

mix deps.get

To download all the deps, then

mix compile

To compile all elixir files

From Docker Hub

See papey/o2m on Docker Hub

Usage

MIX_ENV=prod mix release

Everything will be generated inside _build dir, to start all the things

./_build/prod/rel/o2m/bin/o2m start

Configuration is passed to o2m using environment variables

The ones that are mandatory in order to connect to Discord :

  • DISCORD_TOKEN from Discord
  • O2M_GUILD_ID from Discord to indentify target guild

Podcast monitoring

Blind tests

See the wiki for a user guide on how to run blind tests.

  • DISCORD_GW_INTENTS set to yes to activate required gateway intents
  • O2M_BT_CHAN_ID from Discord to select the textual channel used to run the blind tests
  • O2M_BT_VOCAL_ID from Discord to select the vocal channel used to run the blind tests
  • O2M_BT_ADMIN from Discord to select the role needed to organize and run blind tests (not needed to participate to the blind tests)

For running blind tests in details, see the wiki.

You can also configure O2M using config.esx, see this file inside the config directory for real life examples.

Emojis reactions

Using a set of emojis, adding a reaction to messages trigger bot commands.

  • 📌 to add a pointer and reminder to a message send on a public channel
  • 👀️ to delete a bot private message (only available in bot private channel)
  • 🔗 to generate Odesli link from a message containing a streaming platform song or album

Notes on Discord permissions

If you run this bot in blind test mode you need to activate all Discord gateway intents.

On the scopes side, the bot needs at least the Send Messages (text permissions) scope. But if you enabled the blind tests feature you need to add Add Reactions (text permissions), Connect (voice permissions), Speak (voice permissions) Manage Events (general permissions).

Running the tests

With proper environment variables

mix test

User Help & Manual

Once the bot is connected,

!help

or for more specific stuff,

!help <command>

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Wilfried OLLIVIER - Main author - Papey

License

LICENSE file for details

Acknowledgments

  • Metalorgie for the awesome website
  • Ausha for the awesome podcast plateform
  • YCKM & Le Bruit for the inspiration around podcasts tools
  • Discord for the plateform they provide for free
  • Kudos @href, my Elixir master !