Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cptcr/twitch-stream-api
This code fetches the Live Stream status of a twitch user and send a ping to a discord webhook.
https://github.com/cptcr/twitch-stream-api
Last synced: about 2 months ago
JSON representation
This code fetches the Live Stream status of a twitch user and send a ping to a discord webhook.
- Host: GitHub
- URL: https://github.com/cptcr/twitch-stream-api
- Owner: cptcr
- License: gpl-3.0
- Created: 2024-08-18T00:48:58.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T01:49:43.000Z (4 months ago)
- Last Synced: 2024-08-19T01:43:29.975Z (4 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# twitch-stream-api
## This code fetches the Live Stream status of a twitch user and send a ping to a discord webhook.# Get Token and Client ID = https://dev.twitch.tv/console/apps
## (Honestly idk how to get the token, just search on google or ask AI idk, i think i got it after registering idk)[![Run on Replit](https://replit.com/badge/github/cptcr/twitch-stream-api)](https://replit.com/github/cptcr/twitch-stream-api)
[![Deploy to Cloudflare Workers](https://img.shields.io/badge/Deploy%20to-Cloudflare%20Workers-blue)](https://deploy.workers.cloudflare.com/?url=https://github.com/cptcr/twitch-stream-api)## Required packages:
```ts
chalk: "^4.1.0" //IT MUST BE THIS VERSION!
dotenv: "" //use latest
axios: "" //use lates
```## Command:
```bash
npm install [email protected] dotenv axios
```## .env Variables:
```
WEBH="" # Your Webhook URL (DISCORD)
TWITCHID="" # Your twitch app id
TWITCHSECRET="" # Your twitch secret
```## Requires to config:
```js
const y = {
username: "cptcrr", //twitch username to yours
pingedRole: "1274521772821053510" //Role id to ping on discord
}
```