#ShardPayload removed

1 messages · Page 1 of 1 (latest)

chrome tartan
#

Is there a replacement for Event::ShardPayload? It seems to have been removed since 0.11.0 and I haven't been able to find an equivalent variant in the docs.

serene wagon
mystic elm
#

Wtf jacher here :0

chrome tartan
#

Not sure how to get a hold of this. My original code used ShardPayload to get a raw event from the gateway event stream.

chrome tartan
# mystic elm Wtf jacher here :0

Trying to figure out why no one with a new 'username' can use my bot 😅 seems the gateway is not sending me events or something from these users. So my first instinct was to update dependencies now I hit this issue

mystic elm
#

Mhmhmh, same thing happened with nitro basic

#

Discord broke every Rust lib

#

Breaking changes

frozen laurel
chrome tartan
#

next_message is called on the events lock?

frozen laurel
#

next_event does not give you the raw payload, next_message gives you full control

chrome tartan
#

Ah I see. Well the use case I have is the gateway is its own process, it just sends to another process for decoding. So next_message should be fine

frozen laurel
#

wrapping that in a mutex does not seem like a very good idea though

chrome tartan
#

It is entirely possible my entire codebase is very out of date

#

Yep checked the example and seems the entire gateway API has largely changed. I guess I'll go through and refactor this now

frozen laurel
#

I'd recommend you to write the gateway client part from scratch

#

It'll be very hard to use the same setup you had in older versions in 0.15

chrome tartan
#

Nothing like a cluster anymore? Seems that was removed too and the example just spawns one shard

frozen laurel
chrome tartan
#

Ah cool ta

#

Is there a new event type to go with next_message or none required?

#

In addition, is there any way to use next_message with a ShardEventStream? It seems only possible to use next_message with individual shards which is undesirable for my use case.

#

Ah nevermind, just spotted ShardMessageStream

mystic elm
#

jacher, i was wondering, what does assyst use for image manipulation, imagescript rust port maybe?

chrome tartan
#

Best to keep this out of here for organisation reasons but I can just quickly say it's a mix of ffmpeg, image-rs, imagescript, imagemagick

mystic elm
#

yeah, sorry for bothering you btw and tysm ^^

frozen laurel
#

You can choose to parse it into an event or use the raw JSON

chrome tartan
#

Just did a bit of tinkering and seem to have it working at the very least 🙂

#

Now to see if my original issue is fixed and new-username users can use the bot...

#

It doesn't seem to be, I can open a new thread for this though as it is largely unrelated to this