use dict as argument for rpc.send_msg
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
This module manage Telegram communication
|
||||
"""
|
||||
import logging
|
||||
from typing import Any, Callable
|
||||
from typing import Any, Callable, Dict
|
||||
|
||||
from tabulate import tabulate
|
||||
from telegram import Bot, ParseMode, ReplyKeyboardMarkup, Update
|
||||
@@ -110,9 +110,9 @@ class Telegram(RPC):
|
||||
"""
|
||||
self._updater.stop()
|
||||
|
||||
def send_msg(self, msg: str) -> None:
|
||||
def send_msg(self, msg: Dict[str, str]) -> None:
|
||||
""" Send a message to telegram channel """
|
||||
self._send_msg(msg)
|
||||
self._send_msg('*Status:* `{status}`'.format(**msg))
|
||||
|
||||
@authorized_only
|
||||
def _status(self, bot: Bot, update: Update) -> None:
|
||||
|
Reference in New Issue
Block a user