
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
twitch-cpr
Advanced tools
Module meant as an extension to tmi.js that allows for the Pausing/UnPausing of Channel Point Rewards. Useful for switching between many game-specific rewards on the fly. Requires XMLHTTPREQUEST, TMI.JS. Recommended: MySQL or some other database to store
Twitch-CPR is meant to act as an extension to Polyphony TwitchBot to allow for the automated pausing/unpausing of channel point rewards. It can also run as a stand-alone console application if you wish.
If you like what you see, consider visiting my patreon, or visit my twitch page for a paypal donation link.
Automated MySQL Database Creation, Customized Table Name Version Call Code Cleanup
npm install twitch-cpr
To find Special Oauth keys:
https://www.twitch.tv/popout/<username>/reward-queue
as the account you wish to authorize for these actions.To generate a client-ID (if you don't have one already):
Getting Reward IDs:
https://www.twitch.tv/popout/<username>/reward-queue
as the account you wish to authorize for these actions.const twitchCPR = require(`twitch-cpr`);
const mysql = require('mysql'); // Required for 2.0 Upgrade
const tmi = require('tmi.js'); // Recommended for chat functionality, though not strictly necessary to function.
const config = require('./config'); // Great to store variables safely
let twitchCPRopts = {
channel_name: config.default.streamer, // REQUIRED!
channelID: config.default.channel_id, // REQUIRED!
authorization: config.identity.authorization, // REQUIRED! OAUTH ****************** This is unique to this service/account combination. Info on Github.
debug: `false`,
database: true,
mysql: {
host: config.mysql.host,
user: config.mysql.user,
password: config.mysql.password,
database: config.mysql.database
}
}
const Twitch_CPR = require(`twitch-cpr`);
// Call once per command
const twitchCPR = new Twitch_CPR(twitchCPRopts, config.default.channel_id, config.default.streamer); // user-id === room-id in deployment, channel derived automatically
twitchCPR.toggle = function (rewardID, isPaused, twitchCPRopts);
twitchCPR.pause(rewardID);
twitchCPR.unpause(rewardID);
twitchCPR.listGames(channel_id, channel_name, client);
twitchCPR.newGame(game_id, channel_id, channel);
twitchCPR.deleteGame(game_id, channel_id, channel);
twitchCPR.updateGame(game_id, channel_id, channel);
twitchCPR.switch(game_id, channel_id, channel);
twitchCPR.version;
Developed by Cazgem for personal use at (https://twitch.tv/cazgem) as well as for his chatbot, Polyphony.
FAQs
Module meant as an extension to tmi.js that allows for the Pausing/UnPausing of Channel Point Rewards. Useful for switching between many game-specific rewards on the fly. Requires XMLHTTPREQUEST, TMI.JS. Recommended: MySQL or some other database to store
We found that twitch-cpr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.