feat: Added bot command version
to display current version.
Requested in #194.
This commit is contained in:
parent
101391fe57
commit
4597824fdb
@ -73,6 +73,7 @@ def register_all_commands(bot):
|
|||||||
bot.register_command(commands('remove_webinterface_user'), cmd_web_user_remove, admin=True)
|
bot.register_command(commands('remove_webinterface_user'), cmd_web_user_remove, admin=True)
|
||||||
bot.register_command(commands('list_webinterface_user'), cmd_web_user_list, admin=True)
|
bot.register_command(commands('list_webinterface_user'), cmd_web_user_list, admin=True)
|
||||||
bot.register_command(commands('change_user_password'), cmd_user_password, no_partial_match=True)
|
bot.register_command(commands('change_user_password'), cmd_user_password, no_partial_match=True)
|
||||||
|
bot.register_command(commands('version'), cmd_version, no_partial_match=True)
|
||||||
# Just for debug use
|
# Just for debug use
|
||||||
bot.register_command('rtrms', cmd_real_time_rms, True)
|
bot.register_command('rtrms', cmd_real_time_rms, True)
|
||||||
# bot.register_command('loop', cmd_loop_state, True)
|
# bot.register_command('loop', cmd_loop_state, True)
|
||||||
@ -1237,6 +1238,10 @@ def cmd_web_user_list(bot, user, text, command, parameter):
|
|||||||
bot.send_msg(tr('command_disabled', command=command), text)
|
bot.send_msg(tr('command_disabled', command=command), text)
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_version(bot, user, text, command, parameter):
|
||||||
|
bot.send_msg(tr('report_version', version=bot.get_version()), text)
|
||||||
|
|
||||||
|
|
||||||
# Just for debug use
|
# Just for debug use
|
||||||
def cmd_real_time_rms(bot, user, text, command, parameter):
|
def cmd_real_time_rms(bot, user, text, command, parameter):
|
||||||
bot._display_rms = not bot._display_rms
|
bot._display_rms = not bot._display_rms
|
||||||
|
@ -165,6 +165,7 @@ joinme = joinme
|
|||||||
queue = queue
|
queue = queue
|
||||||
repeat = repeat
|
repeat = repeat
|
||||||
random = random
|
random = random
|
||||||
|
version = version
|
||||||
mode = mode
|
mode = mode
|
||||||
update = update
|
update = update
|
||||||
list_file = listfile
|
list_file = listfile
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
"removed_tags_from_all": "Removed tags <i>{tags}</i> from songs on the playlist.",
|
"removed_tags_from_all": "Removed tags <i>{tags}</i> from songs on the playlist.",
|
||||||
"removing_item": "Removed entry {item} from playlist.",
|
"removing_item": "Removed entry {item} from playlist.",
|
||||||
"repeat": "Repeat {song} for {n} times.",
|
"repeat": "Repeat {song} for {n} times.",
|
||||||
|
"report_version": "The current version of botamusique is <b>{version}</b>.",
|
||||||
"shortlist_instruction": "Use <i>!sl {indexes}</i> to play the item you want.",
|
"shortlist_instruction": "Use <i>!sl {indexes}</i> to play the item you want.",
|
||||||
"start_updating": "Start updating...",
|
"start_updating": "Start updating...",
|
||||||
"stopped": "Music stopped.",
|
"stopped": "Music stopped.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user