Queer European MD passionate about IT

__init__.py 873 B

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