python-telegram-handler icon indicating copy to clipboard operation
python-telegram-handler copied to clipboard

Fixed emoji support for python-3.8, added use_emoji from initializer, added custom disabling_notification

Open GabrieleCalarota opened this issue 5 years ago • 2 comments

fixed emoji and added some more emoji for every level added support for use_emoji from initializer

added support for disabling notification under certain level

Fixing issue #25

GabrieleCalarota avatar Dec 23 '20 12:12 GabrieleCalarota

Example of usage:

telegram_handler = TelegramHandler(token='', chat_id='', level=logging.DEBUG,
                                   use_emoji=True, disable_notification_logging_level=logging.WARNING)

Will use emoji, support for logging level up to DEBUG, disabling notification is False, so setting level of disabling notification only in DEBUG and INFO log, from WARNING up to CRITICAL will sound notification.

Also added use_emoji set default value to True

GabrieleCalarota avatar Dec 23 '20 12:12 GabrieleCalarota

Codecov Report

Merging #26 (9c13f6d) into master (4ac0e5c) will decrease coverage by 7.63%. The diff coverage is 89.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
- Coverage   98.36%   90.72%   -7.64%     
==========================================
  Files           4        5       +1     
  Lines         122      151      +29     
==========================================
+ Hits          120      137      +17     
- Misses          2       14      +12     
Impacted Files Coverage Δ
telegram_handler/TelegramBotQueue.py 75.00% <75.00%> (ø)
telegram_handler/handlers.py 90.90% <94.44%> (-9.10%) :arrow_down:
telegram_handler/__init__.py 100.00% <100.00%> (ø)
telegram_handler/formatters.py 94.54% <100.00%> (-1.20%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4ac0e5c...9c13f6d. Read the comment docs.

codecov[bot] avatar Dec 24 '20 16:12 codecov[bot]