JJMumbleBot

A plugin-based All-In-One mumble bot solution in python 3.7+ with extensive features and support for custom plugins.

GPL-3.0 License

Stars
50
JJMumbleBot - v1.8.0 - Pseudo-GUI System (Graphical Overhaul), Bug Fixes And More!

Published by DuckBoss over 5 years ago

Major Updates

Pseudo-GUI [PGUI] System

The Pseudo-GUI system is a graphical overhaul to the way the bot writes messages in the mumble server.
Previously, the bot used to simply echo text to the server for it to display.
With this update, the bot generates a pseudo graphical user interface by manipulating html tags!
EXAMPLE:
OLD:

In version 1.7.x, a !help command may look like this:
> user: !echo help
> (Channel)DuckBot:

image
NEW:

In version 1.8.x, a !help command will look like this:
> user: !echo help
> (Channel)DuckBot:

image

ANOTHER EXAMPLE:
OLD:

In version 1.7.x, a !about command may look like this:
> user: !about
> (Channel)DuckBot:

image
NEW:

In version 1.8.x, a !about command will look like this:
> user: !about
> (Channel)DuckBot:

image

Bug Fixes

  • Fixed the !blacklist command
  • Fixed the !whitelist command

All Updates

  • Updated all built-in plugins to use the new PGUI System
  • Updated all built-in plugins to v1.8.0
  • Updated bot version to v1.8.0
  • Restructured help_data in all built-in plugins
  • Added a helper script to the PGUI System for easier development
  • Added a 'quick_gui' method that helps create simple PGUIs faster.
  • Changed !imglist command to private message instead of channel message
  • Added !imglist_echo command to channel message the list of available sound board clips
  • Added an "empty folder" messasge if the !sblist and !imglist commands return an empty folder.
  • Updated youtube-dl dependency to v2019.4.17
JJMumbleBot - v1.7.1_Patch2- Fixed bug with multi-parameter aliases!

Published by DuckBoss over 5 years ago

  • Fixed a bug with the string formatting in aliases that parsed the provided parameters incorrectly resulting in a lot of errors.
    Due to this update, the following commands have been fixed:
    -!yt - youtube search command
    -!p - youtube play command
    -!stream - direct youtube link stream command
    -!v - youtube volume command
JJMumbleBot - v1.7.1_Patch1- Fixed !sleep command bug

Published by DuckBoss over 5 years ago

  • Fixed a bug with the !sleep command that caused it to throw errors and slow down the bot's performance.
JJMumbleBot - v1.7.1 - Reboot Command, Updated String Formatting, And Bug Fixes!

Published by DuckBoss over 5 years ago

Major Updates:

  • JJMumbleBot minimum python requirements have been raised to python v3.6+
  • Added a !reboot command which will stop the bot completely and restart it.

Bug Fixes

  • Added !history command to the bot_commands_privileges.csv file

All Updates

  • Added !restart as an alias to the new command !reboot
  • Added !reboot to the bot_commands_privileges.csv file with a minimum of admin user privileges by default.
  • Added !reboot to the bot_commands help data.
  • Updated all built-in plugins and scripts to fit the new python string formatting in python v3.6+
  • Updated all built-in plugin version to v1.7.1
  • Updated the bot version to v1.7.1
  • Removed unused code and refactored/optimized existing code.
JJMumbleBot - v1.7.0 - Youtube Plugin Reworked, Command History, And More!

Published by DuckBoss over 5 years ago

Major Updates

Youtube Plugin

TL;DR: This youtube plugin update removes the need to download videos before playing them and instead streams them directly to the channel. End-users will not notice any differences in functionality but it is a lot more streamlined and optimized.

  • The !stream command functionality has been brought to the !link command and the !stream command has been removed. This is because they both basically do the same thing. Except now, the !link command will stream youtube videos instead of downloading them first. This is all back-end work so the end user will not notice a difference between the old !link command and the reworked !link command.

Since the removal of the !stream command may be confusing to some users, I made it an alias to the !link command so it won't be an issue. Feel free to remove this alias in your aliases csv file if you don't need it.

Example Usage:
> (Channel) User: !stream my_youtube_link
> (Channel) JJMumbleBot: Stream link given: my_youtube_link
JJMumbleBot takes the user's link and adds it to the queue.
  • The youtube plugin has been completely shifted over to streaming youtube content so it will no longer download videos before playing them. From the front-end (user's point of view) nothing has changed. All of this work is back-end and will not be noticeable for the end user of the bot.
  • Due to the shift to streaming, the youtube plugin no longer requires a temporary media directory so all references to it has been removed from the youtube plugin and the config.ini file.

Command History

TL;DR: Added a tracker to keep track of commands inputted by users: !history
The bot will now keep track of the last few commands inputted by users which can be displayed at runtime with the !history command.

  • The # of commands to keep track of can be configured in the config.ini file. (Default - 25)
  • If the limit of the command history tracker is reached, it will overwrite the oldest commands in the tracker.
Example Usage:
> (Channel) User: !history
> (Channel) JJMumbleBot: 
> Command History:
> [0] !history
> [1] !link blablabla
> [2] !p 4
> [3] !yt blablabla

All Updates

  • The subdirectories ("sound_board/" and "images/") required for the sound_board and image plugins are automatically created if missing.
  • Removed autoconnect because it seems to glitch out with plugins on reconnection. It is currently unfixable. It may be reintroduced in the future.
  • Renamed TickRate in the config.ini file to CommandTickRate.
  • Added CommandHistoryLimit in the config.ini file.
  • Added cmd_history python file to helpers folder.
  • Removed temporary media directory requirement from the bot by removing references in JJMumbleBot and the config.ini file.
  • Implemented command history tracking (up to the # specified in the config)
  • Added !history command to check command history.
  • Updated youtube plugin version to 1.7.0
  • Added warning filter to bs4 module
  • Removed clear_cache command since the youtube plugin no longer downloads content locally
  • Removed old !link command and renamed the current !stream command to !link due to the removal of downloading and streaming becoming the main method of playing music.
  • Removed clear_cache from youtube privileges csv.
  • Removed temporary directory helper methods in the utils python file
  • Updated bot version to v1.7.0 in config.ini file.
JJMumbleBot - v1.6.3 - Fixed Logging Issues

Published by DuckBoss over 5 years ago

All Updates

An issue with the logging system since v1.6.0 has been fixed.

The logging system will now correctly log bot events.

Reminder from v1.6.2 release notes:
With v1.7.0 I plan on removing the current download system to play youtube videos and instead migrate to a fully streaming pattern so that no videos are downloaded. This future change will not be noticeable to any users and will be a purely back-end design change. I will create a legacy branch so that users that wish to use the download-system can still use it.

JJMumbleBot - v1.6.2 - Youtube Streaming Support And Bug Fixes!

Published by DuckBoss over 5 years ago

Major Updates

Youtube Streaming Support

The youtube plugin can now stream youtube videos instead of downloading it first by using the !stream command.
Usage:
!stream 'youtube_url' --> Adds the youtube video to the queue.
This won't download the video and will instead stream it when it is being played.
Note: Youtube live streams are currently not supported. Only uploaded videos can be streamed.

NOTE: With v1.7.0 I plan on removing the current download system to play youtube videos and instead migrate to a fully streaming pattern so that no videos are downloaded. This future change will not be noticeable to any users and will be a purely back-end design change. I will create a legacy branch so that users that wish to use the download-system can still use it.

Bug Fixes:

  • Fixed the !skip alias to correctly redirect to the !next command.
  • Fixed the !replay command to properly replay the last played track.
  • Fixed a bug with aliases that didn't allow parameters to be passed through. All the built-in aliases should be fixed with this update.

Other Updates:

  • Added --quiet parameter to vlc to prevent excessive command line messages while using the youtube plugin.
  • Added --quiet parameter to youtube_dl to prevent excessive command line messages.
  • Updated the bot version to v1.6.2
JJMumbleBot - v1.6.1 - Bug Fixes

Published by DuckBoss over 5 years ago

Bug Fixes:

  • Fixed safe mode in v1.6.0+
  • Fixed sleep command not properly working because it was missing from the bot_commands_privileges csv file.
JJMumbleBot - v1.6.0 - Plugins Restructured, Reconfigurable Command Privileges, And More!

Published by DuckBoss over 5 years ago

Major Updates

Since there are many updates, I will be splitting up the major updates into sections.
Note: This update will require reconfiguring the config.ini file and updating custom plugins to fit the new requirements.

Core Functionality Changes/Updates

  • All commands now have reconfigurable user privilege requirements to execute through the respective privileges csv file.
    For example, the !echo command can be reconfigured so that only elevated users or higher can use it through the bot_commands_privileges.csv file.
    Bot Commands Privileges CSV File Example:
    image
  • All plugins are now structured as submodules in the plugin directory. Each plugin will need to be in its own folder with core plugin file and a privileges csv file. Please check the way the built-in plugins are implemented for a clearer understanding.
  • All plugins now require a priv_path string variable that holds the directory path to the plugin's respective user privilege csv file. This user privilege csv file will be used to determine if a user can execute an entered command.
    For example, the youtube plugin now has a youtube_privileges.csv file in the youtube submodule.
    New Plugins File Structure Example:
    image

Alias Changes

  • Added all alternative commands as aliases.
    These alternative commands will function exactly as they did in previous versions
    Example: !v will function the same as it did before, but it is now an alias to the full command !volume.
    Snippet From Aliases CSV File:
    image

Blacklist Changes

  • Added a blacklist parameter that allows you to give a reason for blacklisting a user.
    For example:
    !blacklist badperson123 because you are bad!
    This command blacklists badperson123 with the reason because you are bad!
    The blacklist command will echo this in the channel chat.

Configuration File Changes

  • Added CommandQueueLimit with a value of 500.
    The command queue limit is a reconfigurable limit to the number of commands that can be stored in the command queue at any given time.
  • Changed the default MultiCommandLimit value to 100.

All Updates

  • Added comments in config.ini file
  • Added CommandQueueLimit with a value of 500
  • Changed default MultiCommandLimit value to 100
  • Fixed some directory paths which had double slashes
  • The plugins template file has been updated to reflect the changes to plugins involving the priv_path requirements
  • Added default user privilege levels to all plugins. You can change this as needed
  • Added user privilege levels to the help plugin
  • Using [!move default/Default] now moves the bot to the default channel configured in the config.ini file
  • Updated all built-in plugin version numbers.
  • Commented system arguments
  • Added reconfigurable command queue limit
  • Changed the way plugins are imported
  • Changed the live plugin check detection due to reworked file structures
  • Refactored alias code for easier readability
  • Added a check for the multi command limit for the sub-commands from aliases. Users can no longer bypass the command limit by using aliases
  • All commands now have reconfigurable privilege levels in their respective csv files
  • Added generic user privilege messages to the channel when an unauthorized user tries to enter a command
  • Changed all built-in plugin versions to match the bot version (v1.6.0)
  • Updated Bot Version to v1.6.0

This was a large update, so any information I might have missed will be in these commit notes:
https://github.com/DuckBoss/JJMumbleBot/commit/55ace600167d9b1c62fe91fae4477044248c226a
https://github.com/DuckBoss/JJMumbleBot/commit/e03d298b119800d5260b86e6cdcc933c61739ef9

JJMumbleBot - v1.5.4 - Logging/Console Improvements And Sound Board Plugin Updates!

Published by DuckBoss over 5 years ago

Major Updates:

Sound Board Plugin Updates:

  • Added !sbdownload command to allow downloading of clips from youtube to use for the sound board.
    Usage:
    !sbdownload 'url_link' 'file_name'
    Example:
    !sbdownload https://youtu.be/dQw4w9WgXcQ sound_clip --> Saves the given youtube clip as sound_clip.wav
  • Added !sbdelete command to allow deletion of .wav audio clips stored in the sound board folder specified in the config.
    Usage:
    !sbdelete 'file_name.wav'
    Example:
    !sbdelete my_sound.wav
  • Added an alternative command call to !sblist. The command !sbl has been included which will just be a short form of !sblist. Both commands serve the same purpose.

Logging/Console Improvements:

  • The logging system will no longer display every saved message in the stdout/console.
  • Multiple new system arguments:
    • -quiet --> Prevents displaying of regular logging prints to the console. This will keep the console window clean. It is ideal for a headless server.
    • -verbose --> Will display extra information during runtime about various processes. This will show extra information like the initialization of plugins, plugin callbacks, etc.

All Updates:

  • Fixed logging level so that it doesn't display all log outputs to stdout/console.
  • Moved system arguments to the GlobalMods class as an improvement to the existing logging system.
  • Improved some existing debug console prints.
  • Added some new debug console prints.
  • All plugins have been modified to use the new reg_print and debug_print methods for printing information to the console.
  • Added a helper method to remove files from directories.
  • Updated the sound_board plugin to include the new commands in the help information.
  • Updated dependency requirements to newest versions.
  • Fixed HTML formatting while displaying all the registered aliases with the !aliases command.
  • Updated bot version to v1.5.4 in config.ini file.
JJMumbleBot - v1.5.3 - Command Aliases!

Published by DuckBoss over 5 years ago

Major Updates:

Command Aliases

  • Command aliases are now implemented to shorten the command calls for long multi-command inputs.
    For example:
    !version ; !about --> This multi-command input will display the version, and about information.
    This can be shortened by assigning this series of commands into an alias!
    !alias botinfo !version | !about --> This command will register the alias as botinfo.
    !botinfo --> Now you can call this registered alias as a command, hence shortening the command call!

Please check the wiki for more information on the alias system and alias commands:
https://github.com/DuckBoss/JJMumbleBot/wiki/Aliases

All Updates/Changes:

  • Added a global variable to keep track of bot's mute status
  • The bot will now only unmute if it is not already unmuted, and mute only if it is not already muted
  • Added aliase support to all existing commands
  • Aliases are now saved between bot sessions by automatically saving aliases to the aliases.csv file
  • Updated the bot version to 1.5.3 in the config.ini file
  • Fixed small bug with muting and unmuting the bot
  • Removed unused old commented code
  • Removed debug prints

Major Updates:

Multi-Command Input: Built-in Audio Plugin Support

Built-in audio plugin commands now work with the multi-command input system released in v1.5.0
For example, this multi-command is now allowed: !yt jazz music ; !p 3 ; !link youtube_song_url
The example command searches youtube for jazz music, plays the 3rd search result automatically, and adds another youtube song (provided by a direct url) into the queue.

Multi-Threaded Command Processing:

JJMumbleBot now handles commands in individual threads for faster processing. This means that commands entered as a multi-command input will no longer be held back by slower commands in the queue!

Bug Fixes:

  • Fixed an issue with the youtube !replay command.
  • Cleared the provided privileges.csv file as the last release accidently still contained Test IDs.

All Updates/Changes:

  • Added the !d20roll command to the randomizer plugin.
  • Implemented multi-threading into the command processing queue.
  • Added a new sleep command to the core bot commands that can be used with !sleep 'seconds'
  • The built-in audio plugins now support multi-command input.
  • Added more feedback messages when commands aren't accepted.
  • Removed delay in sound board file playback.
  • Removed redundant code in audio plugins.
  • Reduced sound board audio buffers to 480 since it doesn't need large buffers.
  • Added an audio file length calculation method, but it is currently unused.
  • Fixed the youtube plugin's replay command.
  • The youtube plugin now remembers the last !yt search command even after following it up with a !link direct link command.
  • Updated requirements.txt with updated dependencies.
JJMumbleBot - v1.5.1 - Youtube Plugin Updates And Bug Fixes!

Published by DuckBoss over 5 years ago

Major Updates:

  • Fixed major bug with youtube plugin that caused it to slow down and eventually crash.
  • Added a !link command to the youtube plugin so youtube links can be directly added to the queue.
    Usage: !link 'youtube_link'
  • Audio plugins are currently not supported in Multi-Command Inputs. A check has been added so it can't be accidently inputted.

All Updates:

  • Fixed memory leak issue with youtube plugin.
  • Fixed slow-down when playing multiple songs in the queue.
  • Fixed an internal string formatting issue.
  • Added a second layer of checks to make sure extra audio processes aren't started.
  • Fixed the !p command that uses 3 parameters for adding a track multiple times into the queue.
  • The youtube plugin can now take direct links with the !link command.
    Usage: !link 'youtubelink'
  • Added !link command to the help section.
  • Removed unnecessary return statements.
  • Audio plugin commands used through the new multi-command input system are currently not supported.
  • Fixed string formatting in user privileges logging.
  • Updated bot and youtube plugin version numbers.
  • Updated html parser for better linux compatibility.
  • Decreased youtube plugin audio output buffer size to 480 instead of 4096 since it caused some problems on older hardware.
JJMumbleBot - v1.5.0 - Multi-Command Inputs, Command Queue, Command Tokens, And More...

Published by DuckBoss over 5 years ago

Major Updates:

Command Tokens:

  • You can now define what the bot command token is in the config.ini file.
    For example, the default token is the '!' character. This command token signals to the bot that the entered text is a command.
    Examples: !version, ~version, %version, *version
    NOTE: Multi-character command tokens are not supported. If detected, it will revert back to '!'

Multi-Command Inputs:

  • The bot can now receive multiple commands from a single line like so:
    !version ; !uptime ; !about ; !quit
    (It uses the ';' symbol to separate commands)
  • You can set the maximum number of commands per line in the config.ini file.

Command Queue And Tick Rates:

  • The bot now uses a queue to run commands. This works well with the new multi-command input system
  • There is a new tick rate associated with command inputs which allows the execution time of commands to be modified. For example, with a tick rate of 0.1, the commands in the queue will be executed every 0.1 seconds.
    (You can set the tick rate in the config.ini file)

All Updates/Changes:

  • Logs are now time rotated every day at midnight (UTC). The bot will store a maximum of 30 logs (30 days worth) before recycling the oldest logs.
  • Fixed typos in various scripts
  • Fixed bug with user privileges in the youtube plugin
  • Removed unused code in the bot_commands plugin
  • Updated config.ini version to 1.5.0
JJMumbleBot - v1.4.2 - HotFix: Bug Fixes, User Privilege System Enhancements.

Published by DuckBoss over 5 years ago

All Updates/Changes:

  • User privileges now prevent users from modifying their own user privilege levels.
  • Modified the logging/console output info when a user tried to modify another user's privilege levels.
  • Fixed privileges.csv creating extra blank lines between fields.
  • Fixed soundboard plugin issue where deprecated code caused errors.
  • Updated config to reflect bot version
  • Fixed a bug that caused the bot to crash when refreshing plugins.
JJMumbleBot - v1.4.0 - Upgraded user privilege system, new built-in plugins and more!

Published by DuckBoss over 5 years ago

Major Updates:

New Built-in Plugin: randomizer

  • The randomizer plugin allows users to do coin-flips, dice-rolls, and custom dice-rolls (multiple dice, custom number of dice faces)
    Randomizer Plugin - WIKI

Plugin Template Update

  • Individual plugins now support having version data per plugin.
  • All plugins now require help-data and plugin-version data.
  • Plugin version data can be shown with their respective !help commands.
    Plugins - WIKI

Upgraded User Privilege System

  • The new user privilege system uses csv files to store user privilege levels instead of plain text files.
  • Support for minimum privilege level requirements for certain commands (ex: admin+ only commands).
  • Automatically registers new users with the default privilege level when they enter their first command.
  • No need to manually modify user privilege files anymore, the new commands will take care of it.
  • New commands:
    • !privileges: Shows a full list of the user privileges for all registered users.
    • !setprivileges: Manually set a registered user's privilege level with a command.
    • !addprivileges: Manually register a new user to the user privilege system.

All Updates/Changes:

  • Added user privilege level requirements to most commands.
  • Updated all built-in plugins to match the new plugin-template standards.
  • Updated all built-in plugins to use the new user privilege system.
  • Migrated privilege system code into the appropriate files instead of using utils.
  • Updated the new randomizer plugin to use the new user privilege system.
  • Updated the help plugin to include the new randomizer plugin.
  • Included the uptime plugin in safe-mode.
  • Fixed some typos in some code.

Fixed Bugs:

  • Fixed issue with randomizer plugin not generating unique seeds on Windows systems.
  • Fixed an issue with !log command not properly logging data.

Known Bugs:

  • The user privileges csv tends to get filled with extra blank lines over time with use.
    I'm currently investigating the issue, but it doesn't break any features.
JJMumbleBot - v1.3.3 - Optimization Update

Published by DuckBoss over 5 years ago

This update focuses mostly on optimizations.

All Changes:

  • Optimized config access
  • Removed unused dependencies
  • Renamed the MumbleBot file to JJMumbleBot
  • Removed deprecated/unused code
  • Added a config access script in the helpers folder
  • Fixed a minor issue with sound overlapping when a youtube video was played during a sound board track
  • Refactored config access during plugin initialization
  • The bot now echoes in the channel chat using the UserID name from the config.ini
  • Moved the !version command to the core bot functions instead of the bot commands plugin
  • Fixed inconsistent legacy naming scheme in some plugins
  • Added more config getters to the utils script to make development easier
JJMumbleBot - v1.3.2 - AutoReconnect feature, fixed bugs

Published by DuckBoss over 5 years ago

Major Changes:

  • Added an AutoReconnect feature which can be set to true/false in the config.ini
  • Fixed a bug with safe mode causing plugins to refresh constantly
  • Fixed a bug with user privileges in the images plugin
  • Changed image download to use a stream and removed deprecated urllib code
  • Cleaned up a lot of code
JJMumbleBot - v1.3.1 - Config Overhaul, Logging Features, and more.

Published by DuckBoss over 5 years ago

Major Changes:

  • Added a Logging system
  • Migrated the user configurations to INI files instead of python files.

This version includes a hotfix to log/config files.

All Changes/Updates:

  • Added logging feature to keep track of bot usage and command history.
  • Migrated config system to use INI files instead of python files.
  • Added "-debug" system argument to run debug tests during the bot initialization process.
  • Updated .gitignore to include log files and other test files.
  • Added debug mode to run debug tests during bot initialization.
  • Added built-in plugin default values to the new INI Config
  • Added customizable log directory in the new INI config
  • Fixed !whitelist command.
  • Fixed inconsistent volume changing behaviour across youtube/soundboard plugins.

NOTICE:
This update will require re-configuring your config file using the new config.ini
Check this quick start guide for more information on the new config files. It should be straightforward.

The Wiki has been updated to reflect all these changes/updates.

JJMumbleBot - v1.2.2 Release - Minor Update

Published by DuckBoss over 5 years ago