#Art review possible solution

1 messages · Page 1 of 1 (latest)

glass arch
#

During the dev stream, I had an idea for a more manual approach to the art review issue. What if there was a bot that can add artworks from a specific Discord message to the review queue upon command? This way, twins wouldn’t need to load active threads or interact with the Discord API during the art review and would just load arts from the queue when needed. But yeah, the obvious downside is that someone would need to run these commands before the streams.

mortal panther
#

yeah theres a bunch of workarounds we could do like this we just shouldn't have to 😭

atomic pine
#

Well you gotta work with what you got. If there isn't another solution you just have to do stuff like this, even if "we shouldn't have to do this stuff"

glass arch
arctic geode
#

Could work as a temporary solution

regal ingot
#

at least is a temporary solution that could work as a permanent in the future

#

not a bandaid one waiting to fail

atomic pine
#

There's nothing more permanent than a temporary solution

bitter kestrel
austere solstice
#

Looking at the API Get Channel Messages on the art review channel could work as it can be paginated and threads are represented by a message on the channel with the thread id returned in the message object.

glass arch
lavish cradle
#

there also the route of reverse engineering the hidden api the client use (/channels/{channel.id}/threads/search)

austere solstice
worn pagoda
#

tbf most you could likely do with active threads is just grab #1095941852068331560 with thread content (idk yet how that looks like, might need to do some experimenting to see how it looks like)
filter threads by tag, sort by time, grab the message

but I fucking bet that's what you already do with that method, im just looking at the python implementation instead
unfortunately API on their part isnt that versatile

#

but again, i've suggested this before: try doing the get requests throughout the stream before art section periodially, until you get a success, so it doesnt timeout at the worst possible moment
store what you get in cache and then just display when its time to

silver ember
#

could also have mods post arts before stream in a separate locked forum so the actives threads are reduced and the twins can load from that during stream (yes also a Band-Aid solution)

glass arch
hidden spire
#

I tried the hidden search API and it seems to work:

https://discord.com/api/v9/channels/1095941852068331560/threads/search?archived=false&sort_by=last_message_time&sort_order=desc&limit=25&tag_setting=match_some&offset=0
glass arch
#

And apparently we already have this kind of issue even with the public API neurOMEGALUL

hidden spire
#

That's true, it's a workaround but this is the API used by the client, i don't think that discord changes them frequently

bitter kestrel
coral pilot
bitter kestrel
#

It works, but obviously not in the .net library so doubt he will use that

coral pilot
coral pilot
jolly notch
coral pilot
#

forgot to document then i assume?

tawny glacier
# coral pilot forgot to document then i assume?

Probably the docs on the dev site is not auto-generated from the API spec. Rather, the API spec is probably generated from existing codebase as there is no documentation on the spec file itself

coral pilot
#

API spec is probably generated
yeah that's the case with most openapi specs, no one is writing those by hand

tawny glacier
dapper kelp
#

Yeah, I think it is official, but not yet fully documented, since Threads is a "relatively" new feature

Certain API calls, such as listing archived threads and search will return ...
So they are talking about these routes:
/guilds/<guild_id>/threads/archived/<public/private> and
/channels/<channel_id>/threads/search and maybe even /guilds/<guild_id>/threads/search (not listed in doc yet)

See: https://discord.com/developers/docs/topics/threads

And other get requests have the search route clearly documented, see Guild Member Example

tawny glacier
coral pilot
#

"relatively new" it's been 4 damn years vedalCry

tawny glacier
#

I wouldn't know since I just used discord lol

carmine snow
#

oh whoops this already exists

the search route would definitely work, and there is also an undocumented /channels/{channelId}/threads/active route which works the same as its guild counterpart but filtered to the parent channel

I did a bit of performance testing as one of my servers also uses forums pretty heavily

  • /guilds/.../active - ~10sec
  • /channels/.../active - ~900ms
  • /channels/.../search - ~700ms (selecting just the past 2 weeks with min_id)

also worth mentioning that search also includes some first_messages which could cut down on the additional calls needed to retrieve images

honest path
#

I guess the easiest would be to to start fetching using /channels/{channel.id}/threads/search and set min_id to the last messages the twins saw.
After the first request, set max_id to the last (smallest) message id of the previous request and repeat until there are less than 25 threads in the response.
One important thing to note is that if it gets to the point where max_id points to the message right after the one referenced by min_id then the response will not include first_messages so be careful with parsing this.

{"threads":[],"members":[],"has_more":false,"total_results":0}
tawny glacier
#

How about treat art-review like game using game SDK?

#

On the control panel before starting the "game", vedal would only need to fill the parameters for the submission date range. Then it would fetch the art and put it on a queue so the fetch only happen once at the start

blazing whale
mortal panther
worn pagoda
#

gonna have to reopen this with latest issues happening with art review
im pretty sure I wrote this idea b4 already, but i'll reiterate in one message anyways

if you are having issues with discord API blocking you off during stream (possibly due to rate limiting), is it not better to do this instead:

  • launch PC during the day of the stream, or day before
  • cache the art posts that you want for the art review by sending less frequent API requests (like every 10-20 minutes if that satisfies them, or more frequently during times when discord API load worldwide is the lowest)
  • use the cached art posts during art review (immediate access, no latency for displaying, immediate switching possible too)
  • remove cache after stream

even better, cache the art throughout Friday - Monday for the next week entirely for both Neuro and Evil in their respective directories