Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
#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.