Queer European MD passionate about IT

__init__.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """Information about this package.
  2. See `bot.py` for information about Bot class.
  3. ```python3.5+
  4. from davtelepot.bot import Bot
  5. help(Bot)
  6. ```
  7. Legacy `custombot.py` is kept for backward compatibility but will finally
  8. be deprecated.
  9. """
  10. __author__ = "Davide Testa"
  11. __email__ = "davide@davte.it"
  12. __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
  13. __license__ = "GNU General Public License v3.0"
  14. __version__ = "2.1.32"
  15. __maintainer__ = "Davide Testa"
  16. __contact__ = "t.me/davte"
  17. import logging
  18. # Legacy module; please use `from davtelepot.bot import Bot` from now on
  19. from davtelepot.custombot import Bot
  20. # Prevent aiohttp from encoding file names as URLs, replacing ' ' with '%20'
  21. # Thanks @Nickoala (Nick Lee) for this hack from his archived `telepot` repo
  22. try:
  23. import aiohttp
  24. from davtelepot.hacks import hacked_content_disposition_header
  25. aiohttp.payload.content_disposition_header = (
  26. hacked_content_disposition_header
  27. )
  28. except (ImportError, AttributeError) as e:
  29. logging.error(f"{e}")