Provide blacklist feedback to telegram

This commit is contained in:
Matthias
2020-05-28 07:04:06 +02:00
parent 0e8f95effd
commit 7399c7e70c
2 changed files with 17 additions and 0 deletions

View File

@@ -534,6 +534,11 @@ class Telegram(RPC):
try:
blacklist = self._rpc_blacklist(context.args)
errmsgs = []
for pair, error in blacklist['errors'].items():
errmsgs.append(f"Error adding `{pair}` to blacklist: `{error['error_msg']}`")
if errmsgs:
self._send_msg('\n'.join(errmsgs))
message = f"Blacklist contains {blacklist['length']} pairs\n"
message += f"`{', '.join(blacklist['blacklist'])}`"