Skip to content

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 bot (Python) - done mostly because I wanted to try out Elixir!

Notifications You must be signed in to change notification settings

naghim/selaphiel-bot-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selaphiel Bot - Elixir version

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! 💧✨

How to run

  1. Clone the repository
git clone https://github.com/naghim/selaphiel_bot_elixir.git
cd selaphiel_bot_elixir
  1. Install the dependencies Ensure you have Elixir and Erlang installed. Then:
mix deps.get
  1. 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.

  1. Run the bot:
mix run --no-halt

Dependencies

Limitations

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.

About

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 bot (Python) - done mostly because I wanted to try out Elixir!

Topics

Resources

Stars

Watchers

Forks

Languages