{"id":25321435,"url":"https://github.com/dev-diaries41/notify","last_synced_at":"2026-01-26T17:31:29.201Z","repository":{"id":218604004,"uuid":"746884757","full_name":"dev-diaries41/notify","owner":"dev-diaries41","description":"A flexible class for sending notifications via telegram and discord","archived":false,"fork":false,"pushed_at":"2024-11-03T19:06:48.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T00:42:19.597Z","etag":null,"topics":["discord","notifications","telegram"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-diaries41.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-22T21:30:20.000Z","updated_at":"2025-01-13T22:11:20.000Z","dependencies_parsed_at":"2025-10-29T00:31:55.685Z","dependency_job_id":"7af53ba5-ce4e-4877-9286-fefd967c5735","html_url":"https://github.com/dev-diaries41/notify","commit_stats":null,"previous_names":["dev-diaries41/notify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-diaries41/notify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Fnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Fnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Fnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Fnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-diaries41","download_url":"https://codeload.github.com/dev-diaries41/notify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Fnotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28782937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","notifications","telegram"],"created_at":"2025-02-13T22:53:43.289Z","updated_at":"2026-01-26T17:31:29.172Z","avatar_url":"https://github.com/dev-diaries41.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notify\n\n## Table of Contents\n1. [Overview](#overview)\n2. [How To Install](#how-to-install)\n3. [How To Use](#how-to-use)\n\n## Introduction\n\u003ca name=\"overview\"\u003e\u003c/a\u003e\nThe `notify` module is a notification utility that allows you to send messages via Telegram and Discord. It provides a simple API for broadcasting messages to multiple recipients on these platforms.\n\n## How To Install\n\u003ca name=\"how-to-install\"\u003e\u003c/a\u003e\n\nTo install the `notify` module, follow these steps:\n\n\n```bash\nnpm install notify-utils\n```\n\n## How To Use\n\u003ca name=\"how-to-use\"\u003e\u003c/a\u003e\nYou can get your Telegram bot token from the `Bot Father` Telegram channel. You can get your Discord webhook URL from within Discord.\n\n### Examples\n\nExample of sending a Telegram notification:\n\n```typescript\nimport { Notify } from 'notify-utils';\n\n// Your Telegram bot token from Bot Father\nconst config = {\n  telegramConfig: {\n    token: 'YOUR_TELEGRAM_BOT_TOKEN'\n  }\n};\n\n// Initialize Notify instance\nconst notify = new Notify(config);\n\n// Send a message\nconst chatId = 'TELEGRAM_CHAT_ID'; // Replace with the actual chat ID. For channels and groups the channel and group name can be used e.g @my_channel\nconst message = 'Hello, this is a test message for Telegram!';\nnotify.telegram(chatId, message)\n  .then(response =\u003e {\n    console.log(response);\n  })\n  .catch(error =\u003e {\n    console.error(error);\n  });\n```\n\nExample of sending a Discord notification:\n\n```typescript\nimport { Notify } from 'notify-utils';\n\n// Your Telegram bot token from Bot Father\nconst config = {\n  telegramConfig: {\n    token: 'YOUR_TELEGRAM_BOT_TOKEN'\n  }\n};\n\n// Initialize Notify instance (the telegram config is still needed because Notify extends TelegramBot class)\nconst notify = new Notify(config);\n\n// Send a message\nconst webhookUrl = 'YOUR_DISCORD_WEBHOOK_URL'; // Replace with the actual webhook URL\nconst message = 'Hello, this is a test message for Discord!';\nnotify.discord(webhookUrl, message)\n  .then(response =\u003e {\n    console.log(response);\n  })\n  .catch(error =\u003e {\n    console.error(error);\n  });\n```\n\nExample of sending a broadcast notification:\n\n```typescript\nimport { Notify } from 'notify-utils';\n\n// Your Telegram bot token from Bot Father\nconst config = {\n  telegramConfig: {\n    token: 'YOUR_TELEGRAM_BOT_TOKEN'\n  }\n};\n\n// Initialize Notify instance\nconst notify = new Notify(telegramConfig);\n\n// Define recipients\nconst recipients = [\n  { telegramChatId: 'TELEGRAM_CHAT_ID_1' },\n  { discordWebhookUrl: 'DISCORD_WEBHOOK_URL_1' }\n  // Add more recipients as needed\n];\n\n// Message to be broadcasted\nconst message = 'Hello, this is a broadcast message!';\n\n// Send broadcast message\nnotify.broadcast(recipients, message)\n  .then(response =\u003e {\n    console.log(response);\n  })\n  .catch(error =\u003e {\n    console.error(error);\n  });\n```\n\n### Notes:\n- Replace `'YOUR_TELEGRAM_BOT_TOKEN'`, `'TELEGRAM_CHAT_ID'`, and `'YOUR_DISCORD_WEBHOOK_URL'` with your actual credentials.\n\nThis documentation provides a basic overview and usage examples for the `Notify` class, making it easier for users to integrate and use it in their projects.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-diaries41%2Fnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-diaries41%2Fnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-diaries41%2Fnotify/lists"}