Remove Kick monitoring module
All checks were successful
Auto Build and Push Docker Image / build (push) Successful in 13s

This commit is contained in:
2026-04-02 07:55:42 +00:00
parent ed2919224b
commit f90f0cb7ab
9 changed files with 7 additions and 413 deletions

View File

@@ -12,12 +12,11 @@ The bot uses a **Modular Command & Event Loading** pattern with **ESM (ECMAScrip
3. **Interface-Driven Commands:** All commands implement `Command` interface.
4. **SQLite Database:** Persistent data storage with `better-sqlite3`.
5. **Twitch Monitoring:** Periodic API polling with Stream ID tracking.
6. **Kick Monitoring:** Periodic API polling with `@nekiro/kick-api` library.
7. **Reminder System:** Periodic reminder checking with target_time tracking.
8. **Auto-Response System:** Trigger word detection for automatic replies.
9. **Welcome/Goodbye System:** Guild member add/remove events with customizable messages.
10. **Logging System:** Configurable event logging (messages, roles, moderation, etc.).
11. **Grouped Commands:** Admin/Owner/Trigger/Timer commands grouped under subcommands.
6. **Reminder System:** Periodic reminder checking with target_time tracking.
7. **Auto-Response System:** Trigger word detection for automatic replies.
8. **Welcome/Goodbye System:** Guild member add/remove events with customizable messages.
9. **Logging System:** Configurable event logging (messages, roles, moderation, etc.).
10. **Grouped Commands:** Admin/Owner/Trigger/Timer commands grouped under subcommands.
## 📁 Project Structure
@@ -31,7 +30,6 @@ pixelpoebel/
│ │ ├── ping.ts
│ │ ├── help.ts
│ │ ├── twitch.ts
│ │ ├── kick.ts # Kick streaming
│ │ ├── trigger.ts # Auto-responses
│ │ ├── timer.ts # Reminders
│ │ ├── welcome.ts # Welcome/Goodbye messages
@@ -54,7 +52,6 @@ pixelpoebel/
│ ├── Command.ts
│ ├── Database.ts
│ ├── TwitchManager.ts
│ ├── KickManager.ts
│ ├── ReminderManager.ts
│ └── Deployer.ts
├── data/ # SQLite database (volume mounted)
@@ -149,18 +146,6 @@ CREATE TABLE twitch_monitors (
UNIQUE(guild_id, channel_name)
);
-- kick_monitors
CREATE TABLE kick_monitors (
id INTEGER PRIMARY KEY AUTOINCREMENT,
guild_id TEXT,
channel_name TEXT,
discord_channel_id TEXT,
custom_message TEXT,
last_status TEXT DEFAULT 'offline',
last_stream_id TEXT,
UNIQUE(guild_id, channel_name)
);
-- auto_responses
CREATE TABLE auto_responses (
id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -344,42 +329,7 @@ if (wasOffline || (monitor.last_status === 'online' && isNewStream)) {
}
```
### 9. Kick Monitoring with @nekiro/kick-api
```typescript
// Uses @nekiro/kick-api library for OAuth 2.1 authentication
import { client as KickClient } from '@nekiro/kick-api';
const kickClient = new KickClient({
clientId: process.env.KICK_CLIENT_ID,
clientSecret: process.env.KICK_CLIENT_SECRET,
});
// Fetch channel and livestream data
const channels = await kickClient.channels.getChannels({ slug: [channelName] });
const livestreams = await kickClient.livestreams.getLivestreams({
broadcaster_user_id: [channel.user_id]
});
// Stream ID tracking prevents duplicate notifications
const streamId = livestream.session_id?.toString();
const isNewStream = monitor.last_stream_id !== streamId;
const wasOffline = monitor.last_status === 'offline';
if (wasOffline || (monitor.last_status === 'online' && isNewStream)) {
// Send notification to Discord channel
DB.run('UPDATE kick_monitors SET last_status = "online", last_stream_id = ? WHERE id = ?',
streamId, monitor.id);
}
```
**Required Environment Variables:**
- `KICK_CLIENT_ID` - Kick Developer App Client ID
- `KICK_CLIENT_SECRET` - Kick Developer App Client Secret
**Kick Developer App Setup:** https://docs.kick.com/getting-started/kick-apps-setup
### 10. Configurable Warn System
### 9. Configurable Warn System
**Database Schema:**
- `warn_threshold`: Number of warns before action
@@ -475,7 +425,6 @@ docker-compose up -d --build
| `/ping` | | Public |
| `/help` | | Public |
| `/twitch` | online, add, remove, list, listall, help | Public/Admin |
| `/kick` | online, add, remove, list, help | Public/Admin |
| `/trigger` | add, remove, list, help | Public/Admin |
| `/timer` | add, remove, list, listall, help | Public/Admin |
| `/welcome` | setchannel, add, remove, list, help | Admin |