-
Notifications
You must be signed in to change notification settings - Fork 0
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
React to twitter threads with 🧵 #67
Comments
Seems to me that this is very difficult or impossible without using the Twitter API v2. We currently use v1.1 through Tweepy, but Tweepy does support v2. So if we ever want to do this, we'll have to migrate (which might not be too bad considering the limited scope of our usage). |
Would upgrading Tweepy be small enough to fit into this task or should I make a separate issue? |
Update: While investigating whether or not this feature is possible in v2, @nhawke discovered that, while v2 has the facilities for us to implement this feature, there is no support for videos in media links. This initially made this feature and a v2 upgrade seem impossible, but we realized we could simply use both APIs wherever they are needed. It is unknown whether or not Twitter has plans to deprecate/remove API v1.1, so this solution will work for the foreseeable future. I will create another issue for integrating a v2 API handle so that we can do work on this issue. |
Depends on #107 |
This change migrates all of our old Twitter integration to the V2 API via [Tweepy](https://github.com/tweepy/tweepy). In order to use the V2 API, we have to migrate with OAuth 2.0 instead of OAuth 1.0. Because of this, the config variables for the Twitter API consumer keys have been removed, and the command-line parameters and environment variables for them have been deprecated. Twitter integration now only accepts a bearer token. Besides that, all behavior with provided by Twitter integration should remain unchanged to the user. The code itself has become slightly more complex, as Tweepy is not as pythonic an API wrapper as [discord.py](https://github.com/Rapptz/discord.py) and thus does not provide much help to simplify the more-complex V2 API. I was able to figure out the issues with migrating #97 to V2 which were discovered in the initial investigation of V2 during #67. This is the reason why references to V1 are fully removed. It seems that all behavior of V1 is replicable with V2, albeit not always as pretty. This resolves #107.
Is your feature request related to a problem? Please describe.
Users currently have to alert the channel that a tweet they've posted is actually a thread by either writing it out or reacting with a 🧵 emoji
Describe the solution you'd like
Memebot should detect when a tweet has multiple replies from the user who posted it and react with a 🧵
Describe alternatives you've considered
This might be confusing for tweets that have people promoting stuff underneath them. We could consider something a thread only if it passes a certain threshold of replies by the OP, but that would also leave out things like people replying to their own tweet with another joke.
Additional context
Should be pretty similar to the work done for image number reactions in #40
The text was updated successfully, but these errors were encountered: