feat: purge status channel on startup for clean dashboard

- Add purgeChannel() to Channel interface and DiscordChannel
- Uses bulkDelete for recent messages, individual delete for old ones
- Called once at startup before creating fresh dashboard messages
This commit is contained in:
Eyejoker
2026-03-14 00:52:41 +09:00
parent d06a835163
commit 7a726c335d
3 changed files with 63 additions and 1 deletions

View File

@@ -88,6 +88,8 @@ export interface Channel {
syncGroups?(force: boolean): Promise<void>;
// Optional: get channel metadata (position, category) for ordering.
getChannelMeta?(jids: string[]): Promise<Map<string, ChannelMeta>>;
// Optional: delete all messages in a channel (used for dashboard cleanup).
purgeChannel?(jid: string): Promise<number>;
}
// Callback type that channels use to deliver inbound messages