Sign inSign up

onevl/chzzk-noti-bot

By onevl

•Updated 4 months ago

This bot provides notifications based on 치지직 (Chzzk) broadcast categories via Discord webhooks

Image
Monitoring & observability
0

10K+

onevl/chzzk-noti-bot repository overview

⁠치지직 카테고리 알림 봇 chzzk-noti-bot

GitHub last commit Visitor Count GitHub issues GitHub stars GitHub forks Docker Hub Version DockerHub License: MIT

ko-fi

이 봇은 지정한 치지직 방송 카테고리에서 방송이 시작되면 해당 방송의 정보를 디스코드 알림으로 알리는 봇입니다.

도커를 통해 설치하여 사용하시면 됩니다.


main

discord-result

⁠사용법

⁠설치

⁠(선택) 바인드할 폴더 접근권한 부여

pre-install-1

설정 파일을 저장할 data 폴더와 로그 파일을 저장할 logs 폴더를 호스트 시스템의 원하는 위치에서

sudo mkdir chzzk && sudo mkdir chzzk/data chzzk/logs

또는

mkdir chzzk
cd chzzk
mkdir data logs

등의 방법으로 생성합니다.

pre-install-2

생성한 폴더에 도커에서 접근 가능하도록 nobody:nogroup 접근 권한을 부여합니다.

sudo chown -R nobody:nogroup chzzk

pre-install-3

성공적으로 접근 권한이 부여되었습니다.

⁠Docker Run
docker run -d \
  --name chzzk-noti-bot \
  -p 34224:34224 \ # host:container 80:34224
  # -e TZ=Asia/Seoul \ # 선택사항, 기본: Asia/Seoul
  -v /root/docker/volumes/chzzk/data:/app/data \ # 선택사항, config.json 설정파일을 저장할 경로
  -v /root/docker/volumes/chzzk/logs:/app/logs \ # 선택사항, 로그 파일을 저장할 경로
  --restart always \ # 재시작 옵션
  onevl/chzzk-noti-bot # latest 도커 이미지 사용
⁠docker-compose.yml
services:
  chzzk-noti-bot-tts:
    image: onevl/chzzk-noti-bot
    container_name: chzzk-noti-bot
    ports:
      - "34224:34224"
    # environment:
    #   - TZ=Asia/Seoul # 선택사항, 기본: Asia/Seoul
    volumes:
      - /root/docker/volumes/chzzk/data:/app/data # 선택사항, config.json 설정파일을 저장할 경로
      - /root/docker/volumes/chzzk/logs:/app/logs # 선택사항, 로그 파일을 저장할 경로
    restart: always

⁠디스코드 웹훅 생성

discord-webhook-1

알림을 수신하고자 하는 채널의 설정으로 들어갑니다.

discord-webhook-2

연동 탭의 웹후크로 이동합니다.

discord-webhook-3

새 웹후크를 생성하고, 관리페이지에서 등록 가능하도록 URL을 복사합니다.

⁠카테고리 등록 및 수정

init

도커 설치 이후 초기 상태입니다.

예제로 사용될 알림이 2개 작성되어 있으며, 디스코드 웹훅 URL이 올바르지 않으므로 실제 알림이 발송되지는 않습니다.

modify-add

디스코드 웹훅 URL을 입력하는 칸에 복사해온 URL을 입력합니다.

category

API URL 칸에는 치지직 공식 사이트에서 확인한 카테고리 정보를 가진 API 주소의 URL을 입력합니다.

  https://api.chzzk.naver.com/service/v2/categories/(카테고리 타입)/(카테고리)/lives
  ex: https://api.chzzk.naver.com/service/v2/categories/GAME/Tabletop_Simulator/lives

⁠전역 기본 설정

global

새로운 알림을 생성하는 경우 기본으로 적용될 속성들을 관리하는 페이지입니다.






⁠chzzk-noti-bot

GitHub last commit Visitor Count GitHub issues GitHub stars GitHub forks Docker Hub Version DockerHub License: MIT

ko-fi

This bot provides notifications based on 치지직 (Chzzk) broadcast categories via Discord webhooks.


main

discord-result

⁠Usage

⁠Installation

⁠(Optional) Grant Access Permissions to the Bind Folder

pre-install-1

sudo mkdir chzzk && sudo mkdir chzzk/data chzzk/logs

Or

mkdir chzzk
cd chzzk
mkdir data logs

Create the data folder for configuration files and the logs folder for log files at your desired location on the host system.

pre-install-2

Grant nobody:nogroup access permissions to the created folders to allow Docker access.

sudo chown -R nobody:nogroup chzzk

pre-install-3

Access permissions were successfully granted.

⁠Docker Run
docker run -d \
  --name chzzk-noti-bot \
  -p 34224:34224 \ # host:container 80:34224
  # -e TZ=Asia/Seoul \ # optional, default: Asia/Seoul
  -v /root/docker/volumes/chzzk/data:/app/data \ # optional, path to store config.json file
  -v /root/docker/volumes/chzzk/logs:/app/logs \ # optional, path to store log files
  --restart always \ # restart policy
  onevl/chzzk-noti-bot # Use the latest Docker image

⁠docker-compose.yml
services:
  chzzk-noti-bot-tts:
    image: onevl/chzzk-noti-bot
    container_name: chzzk-noti-bot
    ports:
      - "34224:34224"
    # environment:
    #   - TZ=Asia/Seoul # Optional, Default: Asia/Seoul
    volumes:
      - /root/docker/volumes/chzzk/data:/app/data # Optional, path to store config.json file
      - /root/docker/volumes/chzzk/logs:/app/logs # Optional, path to store log files
    restart: always

⁠Create a Discord Webhook

discord-webhook-1

Go to the settings of the channel where you want to receive notifications.

discord-webhook-2

Go to the Webhooks tab under Integrations.

discord-webhook-3

Create a new webhook and copy the URL for registration in the management page.

⁠Add or Edit a Category

init

This is the initial state after Docker installation.

Two example notifications are written, but actual notifications will not be sent because the Discord webhook URLs are incorrect.

modify-add

Enter the copied URL in the Discord webhook URL field.

category

"In the 'API URL' field, enter the URL of the API address containing category information, which you can find on the official Cheezic website."

  https://api.chzzk.naver.com/service/v2/categories/(Type of the category)/(category)/lives
  ex: https://api.chzzk.naver.com/service/v2/categories/GAME/Tabletop_Simulator/lives

⁠Global Default Settings

global

This is the page for managing the properties that will be applied by default when creating new notifications.

Tag summary

Content type

Image

Digest

sha256:d6dea5e01…

Size

61.5 MB

Last updated

4 months ago

docker pull onevl/chzzk-noti-bot