Compare commits
2 Commits
v1.2.1
...
bf4550ef53
| Author | SHA1 | Date | |
|---|---|---|---|
|
bf4550ef53
|
|||
|
dd2177bd12
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,6 +30,7 @@ env/
|
||||
.config/
|
||||
config*.yaml
|
||||
!config.yaml.example
|
||||
.archive/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
|
||||
@@ -7,12 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [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
|
||||
|
||||
### Added
|
||||
@@ -81,8 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Multi-bot support
|
||||
- Configuration via YAML files
|
||||
|
||||
[Unreleased]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.1...HEAD
|
||||
[1.2.1]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.0...v1.2.1
|
||||
[Unreleased]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/compare/v1.2.0...HEAD
|
||||
[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.0]: https://code.cottongin.xyz/cottongin/Icecast-metadata-IRC-announcer/releases/tag/v1.0.0
|
||||
24
bot.sh
24
bot.sh
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if any arguments were provided
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 <config.yaml> [additional configs...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while true; do
|
||||
# Remove any existing restart flags before starting
|
||||
rm -f .restart_flag_*
|
||||
|
||||
python main.py "$@"
|
||||
|
||||
# Check for any restart flags
|
||||
if ls .restart_flag_* 1> /dev/null 2>&1; then
|
||||
echo "Restart flag(s) found, restarting bot(s)..."
|
||||
sleep 1
|
||||
continue
|
||||
else
|
||||
echo "Bot(s) exited without restart flag, stopping..."
|
||||
break
|
||||
fi
|
||||
done
|
||||
7
main.py
7
main.py
@@ -490,11 +490,8 @@ class IcecastBot:
|
||||
if handler and handler.__doc__:
|
||||
# Get the first line of the docstring
|
||||
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()
|
||||
# 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(
|
||||
prefix=self.cmd_prefix,
|
||||
cmd=pattern,
|
||||
@@ -1202,7 +1199,7 @@ class IcecastBot:
|
||||
if handler and handler.__doc__:
|
||||
# Extract the first line of the docstring
|
||||
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()
|
||||
|
||||
commands.append(section_config['format'].format(
|
||||
|
||||
Reference in New Issue
Block a user