The Messenger Archangel, now reimagined in Elixir. A Discord-to-X relay bot that listens for messages in specific Discord channels and posts them to X/Twitter. This is a reimplementation of the original Selaphiel-bot (Python) done mostly because I wanted to try out Elixir! 💧✨
- Clone the repository
git clone https://github.com/naghim/selaphiel_bot_elixir.git
cd selaphiel_bot_elixir
- Install the dependencies Ensure you have Elixir and Erlang installed. Then:
mix deps.get
- Set up configuration:
Create a
config.json
file in the root directory (this is read at runtime by the app):
{
"twitter_consumer_key": "your_twitter/X_key",
"twitter_consumer_secret": "your_twitter/X_secret",
"twitter_access_token": "your_access_token",
"twitter_access_secret": "your_access_token_secret",
"discord_token": "your_discord_bot_token",
"discord_channel_ids": [111111111111111111]
}
Note
The reason for using the config.json
file is to stay compatible with the original Python implementation, allowing both bots to be used interchangeably with the same configuration file.
- Run the bot:
mix run --no-halt
While the original Python version uses the Twitter/X API v2, which allows posting tweets with fewer restrictions, this Elixir version relies on ExTwitter
, which uses the older API v1.1. That API is now largely deprecated and requires a paid developer account (Basic tier or higher) to post tweets. As a result, tweet posting may fail unless the required access level is granted.