Skip to content
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

Treasure Box / WebcastEnvelopeMessage #27

Closed
dranthir opened this issue Apr 23, 2022 · 9 comments
Closed

Treasure Box / WebcastEnvelopeMessage #27

dranthir opened this issue Apr 23, 2022 · 9 comments

Comments

@dranthir
Copy link

Hi!

First I like to say thanks for your great work, it's very helpful for me right now!

For the project I'm working on I need to receive infos, if someone gifted a treasure box, that everyone in the room can open and may receive some coins. This box is unfortunately not part of the gift list. Is there a way to retrieve infos about it?

After scanning the raw Webcast I think, the WebcastEnvelopeMessage may contain the searched infos, but i'm too dumb to get the raw data decoded... 😕

@zerodytrash
Copy link
Owner

hi,

I will take a look at it when I have time. If you want to do your own research in the meantime, here's what I recommend:

Now you can see what information is in the message. You still have to figure out which attributes are relevant and how to name them. Feel free to share your research status.

@dranthir
Copy link
Author

That worked like a charm...

Yes, WebcastEnvelopeMessage contains a Treasure Box or is empty.

Attached some sample data and the identified fields. But I don't able to work all that data into a .proto file and/or writing a patch to extend your wonderful API to support a Treasure Box Message Event. Maybe you find some time to implement it?

decoded_annotated.pdf
envelope_box.base64.txt
envelope_empty.base64.txt
Treasure_Box_Screenshot

@zerodytrash
Copy link
Owner

Thanks for providing the information! I will add this to the proto file.

@ThanoFish
Copy link

Hey, I also need to detect treasure boxes but don't have any experience with .proto files, has anyone been able to add this to the .proto file?

@dranthir
Copy link
Author

dranthir commented Apr 29, 2022

Hey, I also need to detect treasure boxes but don't have any experience with .proto files, has anyone been able to add this to the .proto file?

zerodytrash is working on it?

@ThanoFish
Copy link

how long will this take? I really need it for the thing im working on rn and ive been trying to implement it with no success for 2 weeks now

@dranthir
Copy link
Author

dranthir commented May 9, 2022

I feel you, but as a free, open source project mantained by one programmer, we have to be patient or do it by ourself...

@ThanoFish
Copy link

ThanoFish commented May 11, 2022

I believe I've managed to make this.
I don't think this is the best or most efficient way to do it, but it works from my testing (except the profile picture url thing, which always seems to be undefined).

I've added the 'treasureBox' event, which returns this object:

{
userId: '7092344136195916805', // data of user who gave the treasure box starts here

uniqueId: 'teamcj17',

nickname: '⚽️ CJ ⚽️',

profilePictureUrl: undefined, // not sure why this is undefined

followRole: 0,

userBadges: [], // data of user who gave the treasure box ends here

coins: 20, // coins in the box

canOpen: 16, // how many people can open the box

timestamp: Long { low: 1652283961, high: 0, unsigned: true } // timestamp of the box being given

}

I've forked this project and added these things to the fork, it would be great if someone can test it out and see if there are any issues other than the pfp thing which I'm trying to fix.

zerodytrash added a commit that referenced this issue Jun 9, 2022
New Events:
- WebcastEmoteChatMessage (subscriber stickers)
- WebcastEnvelopeMessage (treasure boxes) #27
@zerodytrash
Copy link
Owner

Thanks @ThanoFish I have added your work to the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants