Last active
June 10, 2024 10:05
-
-
Save rmdwirizki/1d4cd9c8daadf74d2cdf72af2b97d8e5 to your computer and use it in GitHub Desktop.
Trakteer Webhook: Websocket Javascript Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://assets.trakteer.id/js/trws.min.js"></script> | |
<script> | |
// Get your channel ID in https://trakteer.id/manage/webhook/websocket | |
const channelID = 'INPUT_YOUR_CHANNEL_ID_HERE'; | |
// Register Creator Channel ID | |
TrakteerWS.register(channelID); | |
// Function to handle on stream test notification event | |
TrakteerWS.onStreamTest = (data) => { | |
// WRITE YOUR HANDLER CODE HERE | |
}; | |
// Function to handle on new traktiran notification event | |
TrakteerWS.onNewTipSuccess = (data) => { | |
// WRITE YOUR HANDLER CODE HERE | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment