Compare commits
No commits in common. "v1.2.1" and "v1.2.0" have entirely different histories.
@ -7,12 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [1.2.1] - 2024-07-10
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- Removed redundant "(admin only)" text from help command output when admin commands are already grouped under the Admin section
|
|
||||||
- Improved help command to only show "(admin only)" when a specific admin command is queried
|
|
||||||
|
|
||||||
## [1.2.0] - 2024-07-01
|
## [1.2.0] - 2024-07-01
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@ -81,8 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Multi-bot support
|
- Multi-bot support
|
||||||
- Configuration via YAML files
|
- Configuration via YAML files
|
||||||
|
|
||||||
[Unreleased]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.1...HEAD
|
[Unreleased]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.0...HEAD
|
||||||
[1.2.1]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.0...v1.2.1
|
|
||||||
[1.2.0]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.0.1...v1.2.0
|
[1.2.0]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.0.1...v1.2.0
|
||||||
[1.0.1]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.0.0...v1.0.1
|
[1.0.1]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.0.0...v1.0.1
|
||||||
[1.0.0]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/releases/tag/v1.0.0
|
[1.0.0]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/releases/tag/v1.0.0
|
||||||
19
main.py
19
main.py
@ -490,9 +490,8 @@ class IcecastBot:
|
|||||||
if handler and handler.__doc__:
|
if handler and handler.__doc__:
|
||||||
# Get the first line of the docstring
|
# Get the first line of the docstring
|
||||||
first_line = handler.__doc__.strip().split('\n')[0]
|
first_line = handler.__doc__.strip().split('\n')[0]
|
||||||
# Extract the description part after the colon
|
# Format it using the template and add (admin only) if needed
|
||||||
desc = first_line.split(':', 1)[1].strip()
|
desc = first_line.split(':', 1)[1].strip()
|
||||||
# Add (admin only) for specific command queries
|
|
||||||
if pattern in self.admin_commands:
|
if pattern in self.admin_commands:
|
||||||
desc = f"{desc} (admin only)"
|
desc = f"{desc} (admin only)"
|
||||||
help_text = self.help_specific_format.format(
|
help_text = self.help_specific_format.format(
|
||||||
@ -560,7 +559,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('restart'))
|
@self.bot.on_message(create_command_pattern('restart'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def restart_bot(message):
|
async def restart_bot(message):
|
||||||
"""!restart: Restart the bot
|
"""!restart: Restart the bot (admin only)
|
||||||
|
|
||||||
Gracefully shuts down the bot and signals the bot.sh script
|
Gracefully shuts down the bot and signals the bot.sh script
|
||||||
to restart it. This ensures a clean restart.
|
to restart it. This ensures a clean restart.
|
||||||
@ -582,7 +581,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('quit'))
|
@self.bot.on_message(create_command_pattern('quit'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def quit_bot(message):
|
async def quit_bot(message):
|
||||||
"""!quit: Shutdown the bot
|
"""!quit: Shutdown the bot (admin only)
|
||||||
|
|
||||||
Gracefully shuts down the bot and exits without restarting.
|
Gracefully shuts down the bot and exits without restarting.
|
||||||
|
|
||||||
@ -601,7 +600,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('reconnect'))
|
@self.bot.on_message(create_command_pattern('reconnect'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def reconnect_stream(message):
|
async def reconnect_stream(message):
|
||||||
"""!reconnect: Reconnect to the stream
|
"""!reconnect: Reconnect to the stream (admin only)
|
||||||
|
|
||||||
Attempts to reconnect to the stream and verifies the connection.
|
Attempts to reconnect to the stream and verifies the connection.
|
||||||
Reports success or failure back to the channel.
|
Reports success or failure back to the channel.
|
||||||
@ -617,7 +616,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('stop'))
|
@self.bot.on_message(create_command_pattern('stop'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def stop_monitoring(message):
|
async def stop_monitoring(message):
|
||||||
"""!stop: Stop stream monitoring
|
"""!stop: Stop stream monitoring (admin only)
|
||||||
|
|
||||||
Stops monitoring the stream for metadata changes.
|
Stops monitoring the stream for metadata changes.
|
||||||
The bot remains connected to IRC.
|
The bot remains connected to IRC.
|
||||||
@ -633,7 +632,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('start'))
|
@self.bot.on_message(create_command_pattern('start'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def start_monitoring(message):
|
async def start_monitoring(message):
|
||||||
"""!start: Start stream monitoring
|
"""!start: Start stream monitoring (admin only)
|
||||||
|
|
||||||
Starts monitoring the stream for metadata changes.
|
Starts monitoring the stream for metadata changes.
|
||||||
Will announce new songs in the channel.
|
Will announce new songs in the channel.
|
||||||
@ -649,7 +648,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('quiet'))
|
@self.bot.on_message(create_command_pattern('quiet'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def quiet_bot(message):
|
async def quiet_bot(message):
|
||||||
"""!quiet: Disable song announcements
|
"""!quiet: Disable song announcements (admin only)
|
||||||
|
|
||||||
Continues monitoring the stream for metadata changes,
|
Continues monitoring the stream for metadata changes,
|
||||||
but stops announcing songs in the channel.
|
but stops announcing songs in the channel.
|
||||||
@ -666,7 +665,7 @@ class IcecastBot:
|
|||||||
@self.bot.on_message(create_command_pattern('unquiet'))
|
@self.bot.on_message(create_command_pattern('unquiet'))
|
||||||
@self.admin_required
|
@self.admin_required
|
||||||
async def unquiet_bot(message):
|
async def unquiet_bot(message):
|
||||||
"""!unquiet: Enable song announcements
|
"""!unquiet: Enable song announcements (admin only)
|
||||||
|
|
||||||
Resumes announcing songs in the channel.
|
Resumes announcing songs in the channel.
|
||||||
The bot must already be monitoring the stream.
|
The bot must already be monitoring the stream.
|
||||||
@ -1202,7 +1201,7 @@ class IcecastBot:
|
|||||||
if handler and handler.__doc__:
|
if handler and handler.__doc__:
|
||||||
# Extract the first line of the docstring
|
# Extract the first line of the docstring
|
||||||
first_line = handler.__doc__.strip().split('\n')[0]
|
first_line = handler.__doc__.strip().split('\n')[0]
|
||||||
# Extract the description part after the colon
|
# Remove the command prefix and colon
|
||||||
desc = first_line.split(':', 1)[1].strip()
|
desc = first_line.split(':', 1)[1].strip()
|
||||||
|
|
||||||
commands.append(section_config['format'].format(
|
commands.append(section_config['format'].format(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user