Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add telegram integration #59

Merged
merged 5 commits into from
May 9, 2024
Merged

feat: add telegram integration #59

merged 5 commits into from
May 9, 2024

Conversation

cctdaniel
Copy link
Contributor

No description provided.

@@ -0,0 +1,4 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think people might make mistake here. How do you feel about merging this with publishers.yaml and have something like this:

- name: XYZ
   key: dklaajfaldj
   contract:
     telegram_id:  (optional)
     email: (optional for future)
     slack_channel_id: (optional)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah thats a good idea

)
return

telegram_api_url = f"https://api.telegram.org/bot{os.environ['TELEGRAM_BOT_TOKEN']}/sendMessage"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you load this environment variable in the constructor? So we can catch it earlier if it's not passed.

Copy link
Contributor

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Can you also update the readme and mention how to find the group chat id?

@cctdaniel cctdaniel merged commit 9803a22 into main May 9, 2024
3 checks passed
@cctdaniel cctdaniel deleted the telegram branch May 9, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants