#ShardPayload removed
1 messages · Page 1 of 1 (latest)
https://api.twilight.rs/twilight_gateway/enum.Message.html does this work?
Message to send over the connection to the remote.
Wtf jacher here :0
Not sure how to get a hold of this. My original code used ShardPayload to get a raw event from the gateway event stream.
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
Mhmhmh, same thing happened with nitro basic
Discord broke every Rust lib
Breaking changes
You should use next_message combined with https://docs.rs/twilight-gateway/latest/twilight_gateway/fn.parse.html
Parse a JSON encoded event into a gateway event if its type is in wanted_event_types.
next_message is called on the events lock?
there is next_event and next_message, depending on how low level you want to go
next_event does not give you the raw payload, next_message gives you full control
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
not sure what your variable types are but i guess so
wrapping that in a mutex does not seem like a very good idea though
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
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
Nothing like a cluster anymore? Seems that was removed too and the example just spawns one shard
Utilities for managing collections of shards.
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
jacher, i was wondering, what does assyst use for image manipulation, imagescript rust port maybe?
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
yeah, sorry for bothering you btw and tysm ^^
With next_message you have full access to the payload itself
You can choose to parse it into an event or use the raw JSON