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
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