Compare commits
1 Commits
v1.2.1
...
dd2177bd12
| Author | SHA1 | Date | |
|---|---|---|---|
|
dd2177bd12
|
@@ -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
|
||||||
7
main.py
7
main.py
@@ -490,11 +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:
|
|
||||||
desc = f"{desc} (admin only)"
|
|
||||||
help_text = self.help_specific_format.format(
|
help_text = self.help_specific_format.format(
|
||||||
prefix=self.cmd_prefix,
|
prefix=self.cmd_prefix,
|
||||||
cmd=pattern,
|
cmd=pattern,
|
||||||
@@ -1202,7 +1199,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(
|
||||||
|
|||||||
Reference in New Issue
Block a user