luismayo / ace-attorney-twitter-bot Goto Github PK
View Code? Open in Web Editor NEWTwitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-reddit-bot
License: MIT License
Twitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-reddit-bot
License: MIT License
Please see https://twitter.com/aceCourtBot/status/1462362972450340864
Some simplified Chinese characters are rendered as solid dot (·)
Code 385 means that the petition was deleted. If that's the case the bot cannot tell the user about it so it shouldn't try
Depends on LuisMayo/objection_engine#5
This will help so the bot doesn't lose its queue if it crashes
When video fails to send, a tweet should be sent instead, but it doesn't.
Indeed this is already semi-coded but it isn't fully functional yet
It's unfair as it doesn't let the users remove the videos
take a look at @ShinyLegendary's use of the bot. she is making perhaps 10 requests per hour today. i don't know if you blacklist users but it would be ideal in this situation
Similar to Discord's bot
When someone shares a link or a youtube vod, bot should show the media thumnails as images in the video
Original suggestion: https://twitter.com/NasLeaf/status/1471654990469025794
Hey Luis,
I noticed that when I use the bot with my twitter account @tmoll which uses a whitespace character name, it doesn't render in the bot.
Thread: https://twitter.com/tmoll_/status/1516931029633667072?s=20&t=msFYZQ2HP_chV_cB9c77kg
Render: https://cdn.moll.dev/content/media/random/1517247987419738113.mp4
In order for the bot to avoid putting @/user at the beginning of each text we're stripping all mentions at the beginning of tweets.
However, this does not discriminate between new mentions (which we should be showing) and reply mentions (which we should not).
Example:
Video: https://twitter.com/aceCourtBot/status/1424712034034257923
Wrongly represented tweet in that video: https://twitter.com/Saadiyah21/status/1424398876824514561
May need changes on library
Sometimes thread or user gets lost so instead of sending it as a reply it sends it as a normal tweet
I think it would be cool to add the trial and pursuit music from Justice for All and/or Trials and Tribulations, so it is selected randomly every time the bot is called, or it is specified as an argument in the mention. For example, if you want the music to be from Justice for All, you must mention the bot like this: "@aceCourtbot render, music=JFA"
More specifically this may happen if there are deleted tweets
tweepy.error.TweepError: [{'code': 179, 'message': 'Sorry, you are not authorized to see this status.'}]
So when they spam render several times on the same thread we don't waste resources.
Similar to what the discord bot already has
Similar to what the discord bot already does
Since there is a huge load of petitions right now. It could happen that while we're processing one batch of petitions, so many petitions queue up again than by the time we check the mentions again(up to 200) there are some mentions that were never seen and won't be retrieved.
The solution may be to implement a petition queue from which we extract the petitions in order si we can ask the Twitter api for more mentions more commonly
Relevant info:
https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-mentions_timeline
Vertically | Horizontally |
---|---|
![]() |
![]() |
I am not sure whether this is Korean-specific or being applied to all full-width characters.
If a video takes too long to render, queue info is not reliable
Queue info doesn't update
So if the bot gates rate-limited, the account it uses gets changed so it loops through all the accounts it has in order to bypass twitter's rate-limit
Keys.json could be an array instead of a single object. The first key in the array would be always used to retrieve the mention list and it would be the first to be used to reply. Once it gets rate-limited we jump to the second, etc
If queue gets empty we return to main account
These users would be manually added, and will be able to make public renders (i.e, not in a response, but just posted for the bot).
The way this would work is that when an user request a render, we check whether they're on the whitelist or not, if they are their render will be public. The bot should also mention this in the tweet, and link to the account who requested the render.
These users would need to agree to strictly comply with the rules . They also must have shown interest in the bot for some months. Only AceAdjudicator and ObamaTheSimp would be able to do so for now.
A full test of the music functionality should be run
Change the music detection from the weird split currently done to a proper regex search
V2 API Should allow us to rescue a comment chain even if there are deleted tweets on it.
This comes at the expense of more strict quotas. So the best course of action may be to go and try with v1 API and if it fails go with v2 API
This error has been appearing
[{'code': 324, 'message': 'Pre-processing has not been done for this video'}]
It's specially weird because the bot is explicitly waiting for video to be processed before trying to send the tweet
Example:
https://twitter.com/aceCourtBot/status/1376306661577658371?s=19
When a tweet uses the ampersand it displays as "&" and takes up its own text box which leads me to believe the bot isn't parsing it right
If the bot is being called for the first time in a conversation without the "render" keyword it should reply with info about how to call it properly
If there are less than 2 the bot may crash.
Number should be checked before proceeding
the problem occurs with characters 'і' та 'ї' as seen below
https://twitter.com/aceCourtBot/status/1481934051216924673?t=gqHf24qh73mOczcGmvs0CA&s=09
I'm curious, is CJK supposed to be supported? It seems that the bot can output hiragana fine but it ignored kanji and left those parts blank.
I wonder how hard it would be to support multiple languages. Is it a matter of providing a font?
Depends on #17
Not necessary now that evidence is being presented
Multiprocessing may be added in order to allow the bot to go faster since the queue is getting out of hand
Regression introduced in beb5539
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.