Giter VIP home page Giter VIP logo

discord-stream-notify-bot's Introduction

Discord-Stream-Notify-Bot

Website dcbot.konnokai.me GitHub commits GitHub latest commit

自行運行所需環境與參數

  • .NET Core 6.0 Runtime 或 SDK (微軟網址)
  • Redis Server (Windows 下載網址,Linux 可直接透過 apt 或 yum 安裝)
  • Discord Bot Token (Discord Dev網址)
  • Discord Channel WebHook,做紀錄用
  • Google Console API 金鑰並確保已於程式庫開啟 Youtube Data API v3 (Google Console網址)
  • 錄影功能需搭配隔壁 Youtube Stream Record 使用 (如無搭配錄影的話則不會有關台通知,且不能即時的通知開台) *
  • Twitter AuthToken & CSRFToken,這需要從已登入的 Twitter 帳號中,由名稱為 auth_tokenct0 的 Cookie 來獲得 (如不需要推特語音通知則不需要) **
  • Discord & Google 的 OAuth Client ID 跟 Client Secret,用於 YouTube 會限驗證,需搭配 網站後端 使用 **
  • PubSubCallbackUrl,搭配上面的網站後端做 YouTube 影片上傳接收使用,當有新爬蟲時小幫手會自動註冊,網址格式為: https://[後端域名]/NotificationCallback (Google PubSubHubbub)
  • Uptime Kuma Push 監測器的網址,如果不需要上線監測則可為空,需搭配 Uptime Kuma 使用
  • ffmpeg, streamlink,原則上不裝的話就只是不會錄影 (裝完記得確認 PATH 環境變數是否有設定正確的路徑)
  • Twitch App Client Id & Client Secret (Twitch Develpers) **
  • TwitCasting Client Id & Client Secret (TwitCasting Develpers) **

備註

請使用 Release 組態進行編譯,Debug 組態有忽略掉不少東西會導致功能出現異常等錯誤

如需要自行改程式碼也記得確認 Debug 組態下的 #if 是否會導致偵錯問題

* 未錄影的話則是固定在排定開台時間的前一分鐘通知,若有開啟錄影則會在錄影環境偵測到開始錄影時一併發送開台通知

** 未設定的話則僅該功能無法使用,在使用該功能的時會有錯誤提示

建置&測試環境

  • Visual Studio 2022
  • .NET SDK 6.0
  • Windows 10 & 11 Pro
  • Debian 11
  • Redis 7.0.4

參考專案

授權

  • 此專案採用 MIT 授權

discord-stream-notify-bot's People

Contributors

konnokai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

discord-stream-notify-bot's Issues

bug: 2434 爬蟲卡住

目前猜測是因為有直播在檢測時遇到開台,小幫手進行通知後就卡住了,直到直播結束才會解除
可能需要確認是哪邊導致卡住,正常來說在通知完後就要馬上離開函數才對

取消關台通知

請問是否能不通知關台,在只看的到小窗通知的時候容易跟開台搞混

NijisanjiScheduleAsync NullReferenceException

[2023/03/30 23:03:30] [ERROR] | NijisanjiScheduleAsync: System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.SharedService.Youtube.YoutubeStreamService.NijisanjiScheduleAsync() in Z:\Projects\Discord Stream Notify Bot\Discord Stream Notify Bot\SharedService\Youtube\Schedule.cs:line 197
[2023/03/30 23:08:30] [ERROR] | NijisanjiScheduleAsync: System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.SharedService.Youtube.YoutubeStreamService.NijisanjiScheduleAsync() in Z:\Projects\Discord Stream Notify Bot\Discord Stream Notify Bot\SharedService\Youtube\Schedule.cs:line 197
[2023/03/30 23:13:30] [ERROR] | NijisanjiScheduleAsync: System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.SharedService.Youtube.YoutubeStreamService.NijisanjiScheduleAsync() in Z:\Projects\Discord Stream Notify Bot\Discord Stream Notify Bot\SharedService\Youtube\Schedule.cs:line 197
[2023/03/30 23:18:30] [ERROR] | NijisanjiScheduleAsync: System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.SharedService.Youtube.YoutubeStreamService.NijisanjiScheduleAsync() in Z:\Projects\Discord Stream Notify Bot\Discord Stream Notify Bot\SharedService\Youtube\Schedule.cs:line 197

bug: AddApiQueryDataAsync - Get main version error

[2024/05/18 02:04:37] AddApiQueryData - main [2024/05/18 02:04:37] System.Exception: AddApiQueryDataAsync - Get main version error
at Discord_Stream_Notify_Bot.HttpClients.TwitterClient.AddApiQueryDataAsync(HttpClient httpClient, String webContext, String fileName) in Z:\Projects\Discord\Discord Stream Notify Bot\Discord Stream Notify Bot\HttpClients\Twitter\TwitterClient.cs:line 94
[2024/05/18 02:04:37] Spaces-Data 1OwxWYQboRDGQ: System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.SharedService.Twitter.TwitterSpacesService.<.ctor>b__11_0(Object stats) in Z:\Projects\Discord\Discord Stream Notify Bot\Discord Stream Notify Bot\SharedService\Twitter\TwitterSpacesService.cs:line 68

fix: Twitter Space出現錯誤

[2023/02/09 22:02:25] [ERROR] | GetTwitterSpaceMasterUrl: 1vAGRAdepBzKl
System.NullReferenceException: Object reference not set to an instance of an object.
at Discord_Stream_Notify_Bot.HttpClients.TwitterClient.GetQueryIdAndFeatureSwitchesAsync()
at Discord_Stream_Notify_Bot.HttpClients.TwitterClient.GetTwitterSpaceMetadataAsync(String spaceId, Boolean isRefresh)
at Discord_Stream_Notify_Bot.SharedService.Twitter.TwitterSpacesService.<>c__DisplayClass20_0.<<-ctor>b__0>d.MoveNext()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.