Coder Social home page Coder Social logo

Comments (5)

Ali-Toosi avatar Ali-Toosi commented on August 22, 2024 1

Would absolutely appreciate any contributions. If you have got ideas for implementing this (or possibly any other features) go for it!
As a matter of fact, an hour ago right after this discussion, I thought it's probably about time we added a contribution guide to the repo and added this to the list: https://github.com/Ali-Toosi/django-tgbot/blob/master/.github/CONTRIBUTING.md

from django-tgbot_demo.

Ali-Toosi avatar Ali-Toosi commented on August 22, 2024

Hi,
This is a limitation of the Bot API and Telegram does not allow this. I assume that is because otherwise bots could go around and spam users with unwanted messages. But anyway this is not something you could change from the code as it's something Telegram API is enforcing.

from django-tgbot_demo.

Schroedingberg avatar Schroedingberg commented on August 22, 2024

But shouldn't it work once I subscribed to the bot? There are plenty of telegram bots that e.g. send daily news updates and these are certainly sent without me sending a message every day.

from django-tgbot_demo.

Ali-Toosi avatar Ali-Toosi commented on August 22, 2024

Oh I see your point now. Yes, this is technically possible but you'd need to do some work for it. Meaning that there are no defined mechanisms right now that allow you to quickly send a message to everyone, you have to do it yourself. This is how I'd suggest you do it:
Create a processor that receives messages only from the admins (you can define who admins are). So whenever an admin sends a message that starts with !notify! the bot will send the rest of their message as a notification to everyone. This way, you are sending notifications with the same style of processing updates.
All of that said, this is probably a common use case and I'll probably add it as a feature to the package sometime in future.

from django-tgbot_demo.

Schroedingberg avatar Schroedingberg commented on August 22, 2024

Sounds great! If you need any help with that let me know, I will try my best :-)

from django-tgbot_demo.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.