Skip to content

Commit 2e37b66

Browse files
authored
Merge pull request #33 from kohlerpop1/kohlerpop1-fixes/updates
Updates to TikTokGiftEvent & grammar fixes!
2 parents 15550ed + c4f0d63 commit 2e37b66

File tree

3 files changed

+11
-21
lines changed

3 files changed

+11
-21
lines changed

API/src/main/java/io/github/jwdeveloper/tiktok/data/events/gift/TikTokGiftEvent.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import lombok.Getter;
3434

3535

36-
/*
36+
/**
3737
* Triggered when user sends gifts that has
3838
* no combo (most of expensive gifts)
3939
* or if combo has finished
@@ -43,11 +43,13 @@
4343
public class TikTokGiftEvent extends TikTokHeaderEvent {
4444
private final Gift gift;
4545
private final User user;
46+
private final User toUser;
4647
private final int combo;
4748
public TikTokGiftEvent(Gift gift, WebcastGiftMessage msg) {
4849
super(msg.getCommon());
4950
this.gift = gift;
5051
user = User.map(msg.getUser(), msg.getUserIdentity());
52+
toUser = User.map(msg.getToUser());
5153
combo = msg.getComboCount();
5254
}
53-
}
55+
}

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div align="center" >
22
<a target="blank" >
33
<img src="https://raw.githubusercontent.com/jwdeveloper/TikTokLiveJava/develop-1_0_0/Tools-ReadmeGenerator/src/main/resources/logo.svg" width="15%" >
4-
</img>
54
</a>
65
</div>
76
<div align="center" >
@@ -12,18 +11,15 @@
1211
<div align="center" >
1312
<a href="https://jitpack.io/#jwdeveloper/TikTok-Live-Java" target="blank" >
1413
<img src="https://jitpack.io/v/jwdeveloper/TikTok-Live-Java.svg" width="20%" >
15-
</img>
1614
</a>
1715

1816

1917
<a href="https://discord.gg/e2XwPNTBBr" target="blank" >
2018
<img src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white" >
21-
</img>
2219
</a>
2320

2421
<a target="blank" >
2522
<img src="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white" >
26-
</img>
2723
</a>
2824
</div>
2925
</div>
@@ -33,7 +29,7 @@ A Java library inspired by [TikTokLive](https://github.com/isaackogan/TikTokLive
3329
The library includes a wrapper that connects to the WebCast service using just the username (`uniqueId`). This allows you to connect to your own live chat as well as the live chat of other streamers.
3430
No credentials are required. Events such as [Members Joining](#member), [Gifts](#gift), [Subscriptions](#subscribe), [Viewers](#roomuser), [Follows](#social), [Shares](#social), [Questions](#questionnew), [Likes](#like) and [Battles](#linkmicbattle) can be tracked.
3531

36-
# Contributors
32+
# Contributors
3733
[Library documentation for contributors](https://github.com/jwdeveloper/TikTokLiveJava/wiki)
3834

3935
<div align="center">
@@ -58,7 +54,7 @@ Do you prefer other programming languages?
5854

5955
## Getting started
6056

61-
1. Install the package
57+
1. Install the package
6258

6359
Maven
6460
```xml
@@ -438,9 +434,9 @@ Triggered every time gift is sent
438434
<p>>Combo: 1 -> comboState = GiftSendType.Begin</p>
439435
<p>Combo: 4 -> comboState = GiftSendType.Active</p>
440436
<p>Combo: 8 -> comboState = GiftSendType.Active</p>
441-
<p>Combo: 12 -> comboState = GiftSendType.Finsihed</p>
437+
<p>Combo: 12 -> comboState = GiftSendType.Finished</p>
442438

443-
Remember if comboState is Finsihed both TikTokGiftComboEvent and TikTokGiftEvent event gets triggered
439+
Remember if comboState is Finished both TikTokGiftComboEvent and TikTokGiftEvent event gets triggered
444440

445441

446442
```java
@@ -697,4 +693,4 @@ public static class CustomListener implements TikTokEventListener {
697693

698694

699695
## Contributing
700-
Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.
696+
Your improvements are welcome! Feel free to open an <a href="https://github.com/jwdeveloper/TikTok-Live-Java/issues">issue</a> or <a href="https://github.com/jwdeveloper/TikTok-Live-Java/pulls">pull request</a>.

collaboration.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Are you willing to help or improve TikTokLiveJava?
2727
- Connecting to TikTok websocket (PushServer)
2828

2929
After successful connection to TikTok, `pushServer` starts to send `ProtocolBuffer`
30-
messages in binary format. This is very important to understand `ProtocolBuffer. Don't worry it is not complicated :).
30+
messages in binary format. This is very important to understand `ProtocolBuffer`. Don't worry it is not complicated :).
3131
All the proto files are included under `API/src/main/proto` After using `Maven compile` command on project, java classes are generated from
3232
those files. so then we can easily map incoming bytes to classes, for examples
3333
`WebcastGiftMessage message = WebcastGiftMessage.parseFrom(incomingBytesArray)`
@@ -200,12 +200,4 @@ need to also include it to interface `EventsBuilder`
200200

201201
Finally we are good to go, our event has been included!
202202

203-
![image](https://github.com/jwdeveloper/TikTokLiveJava/assets/79764581/36ad6f1f-b38c-4cf7-93bd-b4cc0638cba0)
204-
205-
206-
207-
208-
209-
210-
211-
203+
![image](https://github.com/jwdeveloper/TikTokLiveJava/assets/79764581/36ad6f1f-b38c-4cf7-93bd-b4cc0638cba0)

0 commit comments

Comments
 (0)