Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (25 loc) · 1.15 KB

README.md

File metadata and controls

32 lines (25 loc) · 1.15 KB

pvp-clipbot

Monitor issue comments and clip the audio.

Usage

npm install first. Then update the config in main.js:

setConfig({
  YOUTUBE_DL_PATH: "/usr/bin/youtube-dl",        // youtube-dl path (for YouTube)
  GH_TOKEN: "TOKEN",                             // Personal access token
  BASEDIR: "/home/suisei/clips",                 // Clip destination directory
  WEBPAGE_ROOT: "https://suisei.outv.im/clips",  // Public URL of BASEDIR
  TRUSTED_USERS: [],                             // Allowed user list (username in all lowercase)
  REPO_OWNER: "suisei-cn",                       // Issue user/organization name
  REPO_NAME: "starbuttons",                      // Issue repository name
  REPO_ISSUE_ID: 5,                              // Issue number
  FFMPEG_PATH: "ffmpeg",                         // ffmpeg path (optional and usualy not needed)
});

Also tweak this in main.js if you want to change the filter settings:

// Ignore comments older than 200 minutes (200 * 60 * 1000 = 12,000,000 ms)
getIssueAndDo(new Date(new Date() - 12000000).toISOString());

Then run this periodically (e.g. put it in crontab).

License

MIT