{"id":47019691,"url":"https://github.com/tacxou/nestjs_module_twurple","last_synced_at":"2026-03-11T22:04:38.845Z","repository":{"id":143456898,"uuid":"615721371","full_name":"tacxou/nestjs_module_twurple","owner":"tacxou","description":"Twitch API/Chat/PubSub with Twurple NestJS module","archived":false,"fork":false,"pushed_at":"2026-03-11T20:36:12.000Z","size":91,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-11T20:43:51.043Z","etag":null,"topics":["abstract","abstraction","api","async","chat","nestjs","node","nodejs","npm","promise","pubsub","spaces","twitch","twurple"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@tacxou/nestjs_module_twurple","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tacxou.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-18T13:43:01.000Z","updated_at":"2026-03-11T20:36:15.000Z","dependencies_parsed_at":"2024-03-01T11:26:53.250Z","dependency_job_id":"fef4f056-aa77-4467-af24-82cb793c491e","html_url":"https://github.com/tacxou/nestjs_module_twurple","commit_stats":null,"previous_names":["streamkits/nestjs_module_twurple","the-software-compagny/nestjs_module_twurple","tacxou/nestjs_module_twurple"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tacxou/nestjs_module_twurple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacxou%2Fnestjs_module_twurple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacxou%2Fnestjs_module_twurple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacxou%2Fnestjs_module_twurple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacxou%2Fnestjs_module_twurple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tacxou","download_url":"https://codeload.github.com/tacxou/nestjs_module_twurple/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tacxou%2Fnestjs_module_twurple/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30404154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T21:51:19.558Z","status":"ssl_error","status_checked_at":"2026-03-11T21:50:57.892Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["abstract","abstraction","api","async","chat","nestjs","node","nodejs","npm","promise","pubsub","spaces","twitch","twurple"],"created_at":"2026-03-11T22:04:38.375Z","updated_at":"2026-03-11T22:04:38.840Z","avatar_url":"https://github.com/tacxou.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\n    \u003cimg src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Twitch API/Chat/PubSub with Twurple NestJS module\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/org/tacxou\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@tacxou/nestjs_module_twurple.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/org/tacxou\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@tacxou/nestjs_module_twurple.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tacxou/nestjs_module_rcon/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/tacxou/nestjs_module_rcon/actions/workflows/ci.yml/badge.svg\" alt=\"Publish Package to npmjs\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/tacxou/nestjs_module_twurple\" \u003e\u003cimg src=\"https://codecov.io/gh/tacxou/nestjs_module_twurple/graph/badge.svg?token=uDR4AqU12U\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tacxou/nestjs_module_twurple/actions/workflows/release.yml?event=workflow_dispatch\"\u003e\u003cimg alt=\"GitHub contributors\" src=\"https://github.com/tacxou/nestjs_module_twurple/actions/workflows/release.yml/badge.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n# Twurple Module\nTwurple module for the NestJS framework.\n\n## Installation\n\nInstall the package with your preferred package manager:\n\n```bash\n# bun\nbun add @tacxou/nestjs_module_twurple\n\n# npm\nnpm install @tacxou/nestjs_module_twurple\n\n# yarn\nyarn add @tacxou/nestjs_module_twurple\n\n# pnpm\npnpm add @tacxou/nestjs_module_twurple\n```\n\n## Quick start examples\n\n### 1) Configure the module\n\n```ts\n// app.module.ts\nimport { Module } from '@nestjs/common'\nimport { ConfigModule, ConfigService } from '@nestjs/config'\nimport { TwurpleModule, TwurpleOptions } from '@tacxou/nestjs_module_twurple'\n\n@Module({\n  imports: [\n    ConfigModule.forRoot({ isGlobal: true }),\n    TwurpleModule.forRootAsync({\n      imports: [ConfigModule],\n      inject: [ConfigService],\n      useFactory: (config: ConfigService) =\u003e ({\n        config: {\n          authProvider: config.getOrThrow\u003cTwurpleOptions['authProvider']\u003e('TWURPLE_AUTH_PROVIDER'),\n          chatChannels: config.get\u003cstring[]\u003e('TWURPLE_CHAT_CHANNELS', []),\n        },\n      }),\n    }),\n  ],\n})\nexport class AppModule {}\n```\n\n### 2) Inject and use Twurple clients\n\n```ts\n// twitch.service.ts\nimport { Injectable, OnModuleInit } from '@nestjs/common'\nimport {\n  InjectTwurpleApi,\n  InjectTwurpleChat,\n  InjectTwurplePubsub,\n} from '@tacxou/nestjs_module_twurple'\nimport { ApiClient } from '@twurple/api'\nimport { ChatClient } from '@twurple/chat'\nimport { PubSubClient } from '@twurple/pubsub'\n\n@Injectable()\nexport class TwitchService implements OnModuleInit {\n  constructor(\n    @InjectTwurpleApi() private readonly api: ApiClient,\n    @InjectTwurpleChat() private readonly chat: ChatClient,\n    @InjectTwurplePubsub() private readonly pubSub: PubSubClient,\n  ) {}\n\n  async onModuleInit() {\n    this.chat.onMessage((channel, user, message) =\u003e {\n      if (message === '!ping') {\n        void this.chat.say(channel, `Pong @${user}`)\n      }\n    })\n\n    // Example API call\n    const me = await this.api.users.getMe()\n    console.log(`Twurple connected as: ${me?.displayName ?? 'unknown user'}`)\n\n    // Example PubSub subscription\n    // (adapt to your auth flow and topics)\n    // await this.pubSub.registerUserListener(...)\n  }\n}\n```\n\n## Official Twurple documentation\n\nThis module wraps and exposes Twurple clients for NestJS.\nFor questions about Twurple classes, methods, events, and behavior, always refer to the official Twurple documentation:\n\n- https://twurple.js.org/\n- https://twurple.js.org/docs/\n- https://twurple.js.org/reference/\n- https://twurple.js.org/reference/chat/classes/ChatClient.html\n- https://twurple.js.org/reference/api/classes/ApiClient.html\n- https://twurple.js.org/reference/pubsub/classes/PubSubClient.html\n\n## Tests\n```bash\nbun test tests\nbun test tests --watch\nbun test tests --coverage --coverage-reporter lcov\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacxou%2Fnestjs_module_twurple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftacxou%2Fnestjs_module_twurple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftacxou%2Fnestjs_module_twurple/lists"}