Web API to get Hololive member stream schedules
- HTML 88.3%
- Python 11.7%
|
|
||
|---|---|---|
| .github/workflows | ||
| holo_discord_noti | ||
| holo_schedule_api | ||
| tests | ||
| .env | ||
| .gitignore | ||
| app.py | ||
| bot.py | ||
| README.md | ||
| requirements.txt | ||
| wsgi.py | ||
Holo Schedule API
A Web API to get hololive's schedule.
Getting Started
(Only supports local use for now, but it is planned to be deployed somewhere...)
- Install requirements and run
python app.py. - Or use Flask CLI:
flask --app app.py run. http://127.0.0.1:5000/schedulesto get all schedules, default is jp members.- To get en, id members, specify in the url:
/en/schedules. - To get today's schedules:
/schedules/today
Discord Bot
The repository also includes a Discord bot that watches members, stores guild settings in a local SQLite database, and pings users in a configured channel before a stream starts.
Setup
- Set
DISCORD_TOKENbefore running the bot. - Optional: set
DISCORD_GUILD_IDto sync slash commands to one guild while testing. - Optional: set
DISCORD_BOT_DB_PATHto change the local SQLite file location. - Optional: set
SCHEDULE_API_BASE_URLif the bot should read from a different API host.
Run
python bot.py
Slash commands
/setup channelsets the notification channel. This is admin-only./setup regionselectsen,jp, oridfor the schedule source./watch addand/watch removemanage your watched members./watch listshows your current watches./alerts leadsets how many minutes before the stream you want to be pinged.
The bot uses Discord timestamp rendering like <t:unix:F>, so each user sees the scheduled time in their own local Discord time format.
Notes
This program scrapes this page and will update every 5 minutes. However the source page updates every 15 minutes, therefore, there will be at most 20 minutes of delay to the actual stream schedule.