Compare commits
2 Commits
96acbc127b
...
dd2177bd12
| Author | SHA1 | Date | |
|---|---|---|---|
| dd2177bd12 | |||
| d841360031 |
16
main.py
16
main.py
@ -492,8 +492,6 @@ class IcecastBot:
|
||||
first_line = handler.__doc__.strip().split('\n')[0]
|
||||
# Format it using the template and add (admin only) if needed
|
||||
desc = first_line.split(':', 1)[1].strip()
|
||||
if pattern in self.admin_commands:
|
||||
desc = f"{desc} (admin only)"
|
||||
help_text = self.help_specific_format.format(
|
||||
prefix=self.cmd_prefix,
|
||||
cmd=pattern,
|
||||
@ -559,7 +557,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('restart'))
|
||||
@self.admin_required
|
||||
async def restart_bot(message):
|
||||
"""!restart: Restart the bot (admin only)
|
||||
"""!restart: Restart the bot
|
||||
|
||||
Gracefully shuts down the bot and signals the bot.sh script
|
||||
to restart it. This ensures a clean restart.
|
||||
@ -581,7 +579,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('quit'))
|
||||
@self.admin_required
|
||||
async def quit_bot(message):
|
||||
"""!quit: Shutdown the bot (admin only)
|
||||
"""!quit: Shutdown the bot
|
||||
|
||||
Gracefully shuts down the bot and exits without restarting.
|
||||
|
||||
@ -600,7 +598,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('reconnect'))
|
||||
@self.admin_required
|
||||
async def reconnect_stream(message):
|
||||
"""!reconnect: Reconnect to the stream (admin only)
|
||||
"""!reconnect: Reconnect to the stream
|
||||
|
||||
Attempts to reconnect to the stream and verifies the connection.
|
||||
Reports success or failure back to the channel.
|
||||
@ -616,7 +614,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('stop'))
|
||||
@self.admin_required
|
||||
async def stop_monitoring(message):
|
||||
"""!stop: Stop stream monitoring (admin only)
|
||||
"""!stop: Stop stream monitoring
|
||||
|
||||
Stops monitoring the stream for metadata changes.
|
||||
The bot remains connected to IRC.
|
||||
@ -632,7 +630,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('start'))
|
||||
@self.admin_required
|
||||
async def start_monitoring(message):
|
||||
"""!start: Start stream monitoring (admin only)
|
||||
"""!start: Start stream monitoring
|
||||
|
||||
Starts monitoring the stream for metadata changes.
|
||||
Will announce new songs in the channel.
|
||||
@ -648,7 +646,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('quiet'))
|
||||
@self.admin_required
|
||||
async def quiet_bot(message):
|
||||
"""!quiet: Disable song announcements (admin only)
|
||||
"""!quiet: Disable song announcements
|
||||
|
||||
Continues monitoring the stream for metadata changes,
|
||||
but stops announcing songs in the channel.
|
||||
@ -665,7 +663,7 @@ class IcecastBot:
|
||||
@self.bot.on_message(create_command_pattern('unquiet'))
|
||||
@self.admin_required
|
||||
async def unquiet_bot(message):
|
||||
"""!unquiet: Enable song announcements (admin only)
|
||||
"""!unquiet: Enable song announcements
|
||||
|
||||
Resumes announcing songs in the channel.
|
||||
The bot must already be monitoring the stream.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user