Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
/ rediscord Public archive

👾 a simple example of discord and redis pusbub channel, publish twitter mentions to redis in twidis bot and subscribe to them in discord bot in rust to send them in a discord channel

Notifications You must be signed in to change notification settings

wildonion/rediscord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 rediscord Bot

bot link

this bot subscribes to redis pubsub channels related to twitter's mentions, tweets and replies topics and send them to the specified channel in discord.

with bot link we can add the conse bot to discord servers.

get token from here

this bot subscribes to redis pubsub channels related to twitter's mentions, tweets and replies topics and send them to the specified channel in discord.

Code Flow:

in twitter bot server 
    |
    |------ once the fetch user mentions api is called
    | 
     ------ publish response to redis pubsub channel

in discord ws/http client 
    |
    |------ subscribe to the published tweets inside the event listener (loop {})
    |
     ------ send them to all discord channel(s) of all guilds that this bot is inside

🚀 Deploy

Make sure that

  • you've setup the token and discord channel id inside .env file already by building a new application and inivitation link for the this bot inside the discord developer panel.

  • this bot and redis must be in a same docker network.

  • you've setup the twidis bot already in order to get this bot works.

sudo docker network create -d bridge gem || true
export PASSEORD=geDteDd0Ltg2135FJYQ6rjNYHYkGQa70
docker run -d \
    -h redis \
    -e REDIS_PASSWORD=$PASSEORD \
    -v $(pwd)/infra/data/redis/:/data \
    -p 6379:6379 \
    --name redis \
    --network gem \
    --restart always \
    redis:latest /bin/sh -c 'redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}'

sudo docker build -t rediscord -f Dockerfile . --no-cache
sudo docker run -d --link redis --network gem --name rediscord -v $(pwd)/infra/data/rediscord-logs/:/usr/src/app/logs/ rediscord

🥧 Twiscord Architecture Diagram

About

👾 a simple example of discord and redis pusbub channel, publish twitter mentions to redis in twidis bot and subscribe to them in discord bot in rust to send them in a discord channel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages