-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
GiftEvent triggered twice for one gift #211
Comments
This doesn't really sound like a bug, but rather how streaking is handled by TikTok. Please confirm you are not referring to streakable gifts, like Rose, which always fire a minimum of twice (once to start, once to let you know the streak is over). |
Is there any way to fix it? When they send a rose, the action is done twice |
It is not a bug. There is no "fix". Listen for the streak to finish! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've noticed when one gift is sent, the gift event is triggered twice. This happens about 90% of the time.
Here's my code:
from TikTokLive.client.client import TikTokLiveClient
from TikTokLive.client.logger import LogLevel
from TikTokLive.events import ConnectEvent, GiftEvent
client: TikTokLiveClient = TikTokLiveClient(
unique_id="@username"
)
@client.on(ConnectEvent)
async def on_connect(event: ConnectEvent):
client.logger.info(f"Connected to @{event.unique_id}!")
@client.on(GiftEvent)
async def on_gift(event: GiftEvent):
client.logger.info(f"Recieved gift ID = {event.gift.id}!")
if name == 'main':
# Enable debug info
client.logger.setLevel(LogLevel.INFO.value)
The text was updated successfully, but these errors were encountered: