From 6445b85ccdb920df56f8a081e65dfdd9e3903793 Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Thu, 22 Apr 2021 14:21:01 +0200 Subject: [PATCH] Add missing clear clean alias Recent change to introduce a "clear" alias for the "clean" commands missed one case (~clear TRACK). Change-Id: I60334ce80fee07edca335c1a75a295d90d6c39c5 --- ptgbot/admincommands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ptgbot/admincommands.py b/ptgbot/admincommands.py index 2f13580..0b09bd3 100644 --- a/ptgbot/admincommands.py +++ b/ptgbot/admincommands.py @@ -77,7 +77,9 @@ def process_admin_command(db, command, params): elif command == 'list': return 'Available tracks: ' + str.join(' ', db.list_tracks()) - elif command in ('clean', 'add', 'del'): + elif command in ('clean', 'clear', 'add', 'del'): + if command == 'clear': + command = 'clean' if len(params) < 1: return "This command takes one or more arguments" getattr(db, command + '_tracks')(params)