ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - ewohltman/ephemeral-roles: A Discord bot for managing ephemeral roles based upon voice channel member presence.
A Discord bot for managing ephemeral roles based upon voice channel member presence. - ewohltman/ephemeral-roles
Visit Site

GitHub - ewohltman/ephemeral-roles: A Discord bot for managing ephemeral roles based upon voice channel member presence.

GitHub - ewohltman/ephemeral-roles: A Discord bot for managing ephemeral roles based upon voice channel member presence.

ephemeral-roles

Mentioned in Awesome Go Build Status Go Report Card Coverage Status Dev Chat

A Discord bot for managing ephemeral roles based upon voice channel member presence.


Quickstart

  1. Click on the Ephemeral Roles logo head above or use this link to invite Ephemeral Roles into your Discord server
    1. The 'Manage Roles' permission is required. The invite link above provides that by automatically creating an appropriate role in your server for Ephemeral Roles
  2. Ensure the new role for Ephemeral Roles is at the top (or as near as possible) to the server's list of roles
    1. If you're not sure how or why to do that, take a quick read over Discord's excellent Role Management 101 guide
  3. Enjoy!

What does Ephemeral Roles do?

After the Ephemeral Roles bot is invited to your Discord server, it immediately starts to watch for changes to your voice channels. When a member joins a channel, Ephemeral Roles automatically assigns that member an ephemeral role associated with the channel. If the ephemeral role doesn't exist yet, Ephemeral Roles will create it.

By having your members auto-sorted into ephemeral roles in your member list, it's clear to see who are available for chatting and the channels they are in. This is because Ephemeral Roles leverages the Discord feature that the member list in servers will group together members by role right out of the box.

When a member changes or disconnects from voice channels, even across Discord servers, Ephemeral Roles will account for the change and automatically revoke/reissue ephemeral roles as appropriate.


Example Usage

Orange roles below are automatically managed by Ephemeral Roles
Ephemeral Roles action example
Ephemeral Roles static example
Ephemeral Roles example role list

Monitoring

A Prometheus and Grafana instance have been set up to monitor Ephemeral Roles metrics.

grafana.ephemeral-roles.net

Architecture

Architectural Diagram
Architecture
Architectural diagram created with draw.io
  • ephemeral-roles:
    • Runs in a Kubernetes cluster as a StatefulSet of 10 Pods. Each Pod contains a running instance of the bot
    • A StatefulSet is used so that each Pod has a predictable name so that the bot instance can inform the Discord API which of the 10 Pods it is
    • The Discord API will assign a number of the total guilds (servers) to each of the bot instances to balance the load of managing the guild events
    • If any of the Pods stop running for whatever reason, the StatefulSet will automatically restart them
  • pod-bouncer (https://github.com/ewohltman/pod-bouncer):
    • Runs in a Pod and is responsible for receiving alerts from Prometheus/AlertManager and to act upon them by automatically causing unhealthy Pods for ephemeral-roles to restart
  • ephemeral-roles-informer (https://github.com/ewohltman/ephemeral-roles-informer):
    • Runs in a Pod and is responsible for collecting metrics from the ephemeral-roles instances to update search services such as discord.bots.gg and top.gg

Contributing to the project

Contributions are very welcome! Please follow the guidelines below:

  • Open an issue describing the bug or enhancement
  • Fork the develop branch and make your changes
    • Try to match current naming conventions as closely as possible
    • Try to keep changes small and incremental with appropriate new unit tests
  • Create a Pull Request with your changes against the develop branch

This project is equipped with a full CI / CD pipeline:

  • Linting and unit tests will be automatically run with the PR, providing feedback if any additional changes need to be made
  • Merge to master will automatically deploy the changes live

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory