summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-11-06 21:25:15 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-11-06 21:25:15 +0300
commit1546340f35356c09fd4ccc2d25437735855e703a (patch)
tree258e49425728f5776003dc0f086be512e61505ea /src
parent0e3507273b1fac78540f0c82f863756c4f0c63c8 (diff)
inverter_bot: remove unused function
Diffstat (limited to 'src')
-rwxr-xr-xsrc/inverter_bot.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/inverter_bot.py b/src/inverter_bot.py
index 2d640f3..7247995 100755
--- a/src/inverter_bot.py
+++ b/src/inverter_bot.py
@@ -258,47 +258,6 @@ bot.lang.en(
)
-def command_usage(command: str, arguments: dict, language='en') -> str:
- _strings = {
- 'en': LangStrings(
- usage='Usage',
- arguments='Arguments'
- ),
- 'ru': LangStrings(
- usage='Использование',
- arguments='Аргументы'
- )
- }
-
- if language not in _strings:
- raise ValueError('unsupported language')
-
- blocks = []
- argument_names = []
- argument_lines = []
- for k, v in arguments.items():
- argument_names.append(k)
- argument_lines.append(
- f'<code>{k}</code>: {v}'
- )
-
- command = f'/{command}'
- if argument_names:
- command += ' ' + ' '.join(argument_names)
-
- blocks.append(
- f'<b>{_strings[language]["usage"]}</b>\n'
- f'<code>{command}</code>'
- )
-
- if argument_lines:
- blocks.append(
- f'<b>{_strings[language]["arguments"]}</b>\n' + '\n'.join(argument_lines)
- )
-
- return '\n\n'.join(blocks)
-
-
def monitor_charging(event: ChargingEvent, **kwargs) -> None:
args = []
is_util = False