Skip to content

Implement TelegramProvider as NotificationProvider to send releases notification #7

@aldy505

Description

@aldy505

The NotificationProvider interface provides a function abstraction to send a notification through a certain provider, for this issue, it's via Telegram. Using grammy, implement message sending to a specific chatId.

Since there is no constructor, you should create one that bridge the gap between the configuration (in which where we would store the botToken and chatId) and what's needed by grammy.

export class TelegramProvider implements BaseNotificationProvider {
notify(releases: Release[], abortSignal?: AbortSignal | undefined): Promise<void> {
throw new Error("Method not implemented.");
}

You can see the configuration for Telegram here:

adelite/src/config.ts

Lines 21 to 24 in dff5d23

telegram: z.object({
bot_token: z.string(),
chat_id: z.string()
}).optional(),

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions