Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: twitter relay #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ArcaneDisgea
Copy link
Member

Two parter, one significantly smaller than the other.

First, I added prefix to environment variables and to fall back to !! this allows people to test and not get confused by command prefixes like I did yesterday. 😄


Second, Adding the twitter relay to the TC bot so we can stop spending money on yagpdb for twitter relay.

To start, I am just going to apologize if this may not be quite to standard. I am not familiar with typescript but tried to make it match what you've done as best as I could.

I adjusted the config to accept some new variables specifically for the twitter part and typed them appropriately.

I put the creation of the twitter bot instance in it's own file but decided to move the stream tracking itself to server.ts to match what you did with patreons listener. From there it subscribes to a stream of statuses(tweets) that all contain #ffxivteamcraft it checks if the user is our twitter account, if it is it will create and post the embed into discord and if it is not our account it just doesn't do anything.

I considered making the channel it posts to a variable in the config but you hardcoded the patreon channel so I just left it the same.

Requirements

  • A twitter developer account for the teamcraft twitter.
  • Using #ffxivteamcraft on every tweet since forever.

You will need to make a twitter bot for your account that has at least read privileges I believe. From there you can generate your consumer/access tokens & secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant