{"id":19030287,"url":"https://github.com/soratabaka/trakteer-websocket-wrapper","last_synced_at":"2026-05-13T13:48:03.033Z","repository":{"id":45313884,"uuid":"439700430","full_name":"SorataBaka/trakteer-websocket-wrapper","owner":"SorataBaka","description":"Simple trakteer websocket wrapper to emit events on donations","archived":false,"fork":false,"pushed_at":"2021-12-22T00:00:53.000Z","size":70,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-28T07:06:29.137Z","etag":null,"topics":["api","javascript","nodejs","trakteer","websocket","wrapper"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/trakteer-websocket-wrapper","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SorataBaka.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-18T19:40:51.000Z","updated_at":"2023-12-14T14:23:42.000Z","dependencies_parsed_at":"2022-08-28T15:11:25.234Z","dependency_job_id":null,"html_url":"https://github.com/SorataBaka/trakteer-websocket-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SorataBaka%2Ftrakteer-websocket-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SorataBaka%2Ftrakteer-websocket-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SorataBaka%2Ftrakteer-websocket-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SorataBaka%2Ftrakteer-websocket-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SorataBaka","download_url":"https://codeload.github.com/SorataBaka/trakteer-websocket-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240079638,"owners_count":19744725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","javascript","nodejs","trakteer","websocket","wrapper"],"created_at":"2024-11-08T21:17:12.979Z","updated_at":"2026-05-02T16:30:21.040Z","avatar_url":"https://github.com/SorataBaka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trakteer Websocket Wrapper\nSimple websocket wrappper for trakteer. This module requires both creator-stream channels id to be provided in order to be able to connect to the servers and receive data. \u003cbr\u003e\n```Javascript\nconst { TrakteerSocket } = require(\"trakteer-websocket-wrapper\")\nconst client = new TrakteerSocket({\n    mainChannelID: \"creator-stream.a6z7asdfadn4mlqy.trstream-asdfadfasdfasfqT\",\n    testChannelID: \"creator-stream-test.a6sadfeafzn4mlqy.trstream-asdfadfasdfasfqT\"\n})\n//Emitted when client receive donations in trakteer\nclient.on(\"donation\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted when the client successfully connected to Trakteer Websocket\nclient.on(\"connected\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted when the client successfully subscribed to the channels\nclient.on(\"subscribed\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted when server responded to the client ping\nclient.on(\"pong\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted when client failed to subscribe to the channels\nclient.on(\"subscription_error\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted on websocket error\nclient.on(\"error\", (data)=\u003e{\n    console.log(data)\n})\n//Emitted on websocket connection close\nclient.on(\"close\", (data)=\u003e{\n    console.log(data)\n})\n```\n\u003ch2\u003eInstallation\u003c/h2\u003e \u003cbr\u003e\n`npm install trakteer-websocket-wrapper` \u003cbr\u003e\n\n\u003ch2\u003eUsage\u003c/h2\u003e \u003cbr\u003e\n1. Go to the trakteer dashboard \u003cbr\u003e\n2. Click on \"Stream Overlay\" \u003cbr\u003e\n3. Click on \"Open URL\" \u003cbr\u003e\n4. Go to Inspect Elements \u003cbr\u003e\n5. Click on Network \u003cbr\u003e\n6. Click On \"WS\" \u003cbr\u003e\n7. Click On \"Messages\" \u003cbr\u003e\n8. Refresh the page \u003cbr\u003e\n9. Find \n  ```\n  {\"event\":\"pusher:subscribe\",\"data\":{\"auth\":\"\",\"channel\":\"creator-stream-test.asadfasdfalqy.trstream-asdfadfasdfasfa\"}}\n  ```\n  for both creator-stream and creator-test-stream on Messages tab \u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoratabaka%2Ftrakteer-websocket-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoratabaka%2Ftrakteer-websocket-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoratabaka%2Ftrakteer-websocket-wrapper/lists"}