A plugin-based All-In-One mumble bot solution in python 3.7+ with extensive features and support for custom plugins.
config.ini
file to include EnableDatabaseIntegrityCheck=True
under the [Main Settings]
section:
[Main Settings] EnableDatabaseIntegrityCheck = TrueRefer to the /templates/ directory to see a template of the file.
global_aliases.csv
file to custom_aliases.csv
global_aliases.csv
you can simply delete it.
custom_user_privileges.csv
file (template provided in /templates/ folder) and fill it with custom user privileges as required.custom_permissions.csv
file (template provided in /templates/ folder) and fill it with custom command permissions as required.!wiki
: Displays a link to the JJMumbleBot wiki.
Previously, aliases could be updated by modifying the global_aliases.csv
file. Every update to the file required restarting the bot which was very tedious!
In this update, the internal database handling of this process has been improved and the file has been renamed to custom_aliases.csv
for consistency.
With this update, Updating multiple aliases can be updated at runtime using either a local csv file
or a remote csv file
downloaded through a URL.
custom_aliases.csv
file within the cfg folder.*/cfg/
folders mounted.global_aliases.csv
file.alias,command
botinfo,(about)|(version)
In this simple example, the custom_aliases.csv
is modified so that a !botinfo
alias is made to call the !about and !version
commands.
!refreshaliases
.
/cfg/downloads/_aliases.csv
!importaliases 'URL'
Previously, to update the command permissions, each command had to be meticulously updated by modifying multiple csv files across multiple plugin folders.
With this update, that is no longer the case and updating multiple commands can be updated at runtime using either a local csv file
or a remote csv file
downloaded through a URL.
In addition to those updates, new commands have been added to display/update individual command permissions.
!getpermission 'command_name'
: Displays the permission level for the specified command.!setpermission 'command_name' 'permission_level'
: Modifies the permission level for the specified command.custom_permissions.csv
file within the cfg folder.*/cfg/
folders mounted.command,permission
volume,4
In this example, the custom_permissions.csv
is modified so that the volume command is set to a permission level of 4 (administrators and above only).
!refreshpermissions
.
/cfg/downloads/_permissions.csv
!importpermissions 'URL'
Previously, to update the user privileges, administrators had to individually update user privileges using the !setprivileges
command for every user.
With this update, It is much simpler to update multiple user privileges at a time at runtime using either a local csv file
or a remove csv file
downloaded with a URL.
custom_user_privileges.csv
file within the cfg folder.*/cfg/
folders mounted.username,level
Jason,4
Thomas,3
Suzy,4
John,2
In this example, the custom_user_privileges.csv
is modified to update the privileges of individual users.
!refreshuserprivileges
.
/cfg/downloads/_privileges.csv
!importuserprivileges 'URL'
custom_aliases.csv, custom_permissions.csv, and custom_user_privileges.csv
files.1config.ini
file, but disabling it may result in data conflicts when updates occur.
config.ini
file is scanned to make sure the options match the options in the template_config.ini
file to ensure integrity.2config.ini
file since it is critical to prevent conflicts in the config file.
-regeneratedatabase
: Deletes the existing internal database if it exists, so that it can be regenerated from scratch.!volume
command.global_aliases.csv
to custom_aliases.csv
Quick Setup Utility
web utility for v5.2.0This update DOES NOT require you to reconfigure configs, aliases, or database files. This should be a straight-forward update for v5.1.0 users.
-usehttps
: Enable the usage of HTTPS for the web interface.-nohttps
: Disable the usage of HTTPS for the web interface if enabled in the config file.-websslcert
: Enter the path to the SSL certificate file for the web interface (if HTTPS enabled).-websslkey
: Enter the path to the SSL key file for the web interface (if HTTPS enabled).-webgeneratecert
: Enables automatic certificate/key creation for the web interface (if HTTPS is enabled).-noautoreconnect
: Disables auto-reconnecting if the bot disconnects from the mumble server if enabled in the config file.-noselfregister
: Disables self-registration to the connected mumble server if enabled in the config file.-nodatabasebackups
: Disables automatic database backups for the bot service if enabled in the config file.-noaudioduck
: Disables audio ducking for the bot audio system if enabled in the config file.-nologging
: Disables event logging for the bot service if enabled in the config file.-nologtrace
: Disables stack trace logging for all logged events if enabled in the config file.-mediacookie
command line argument documentation in wiki.-nostdin
parameter to ffmpeg launch options in the internal handling of the audio interface.Please make sure you are using the new and updated dependencies from the requirements/xxxxx.txt
files.
In addition to that, please use the updated pymumble library from Github, as the PyPi repository is not updated.
To INSTALL the latest pymumble library and all other dependencies:
pip install -r requirements/requirements.txt -r requirements/web_server.txt
pip install git+git://github.com/azlux/pymumble@pymumble_py3
To UPDATE to the latest pymumble library and update all other dependencies:
pip install --upgrade -r requirements/requirements.txt -r requirements/web_server.txt
pip install --upgrade git+git://github.com/azlux/pymumble@pymumble_py3
fastapi-utils
to the requirements/web_server.txt
file. [Added in 6286906]!kickuser 'username' 'reason'
!banuser 'username' 'reason'
!muteuser 'username'
!unmuteuser 'username'
!deafenuser 'username'
!undeafenuser 'username'
!makechannel 'channel_name'
- This command now only make temporary channels.!makepermanentchannel 'channel_name'
- Creates a permanent channel.!removechannel
command to require a channel name [Updated in 7883ab7]
!removechannel 'channel_name'
!renamechannel 'channel_name' 'new_channel_name'
!moveuser 'username' 'channel'
[GET] /api/general/uptime
- Retrieves the bot up-time information.[GET] /api/general/version
- Retrieves the bot version information.[GET] /api/general/about
- Retrieves the bot about information.[POST] /api/admin/users/join
- Join the channel of a given user.[POST] /api/admin/users/move
- Move the given user to a channel.[POST] /api/admin/users/kick
- Kick the given user and provide an optional reason.[POST] /api/admin/users/ban
- Ban the given user and provide an optional reason.[POST] /api/admin/users/mute
- Mute/Unmute the given user.[POST] /api/admin/users/deafen
- Deafen/Undeafen the given user.[POST] /api/admin/channels/rename
- Rename the given channel to a new name.[POST] /api/admin/channels/remove
- Remove the given channel.[POST] /api/admin/channels/move
- Move to the given channel.[POST] /api/admin/channels/leave
- Leave the current channel and return to the default channel.[POST] /api/admin/channels/make_temporary
- Make a temporary channel with the given name.[POST] /api/admin/channels/make_permanent
- Make a permanent channel with the given name.[POST] /api/admin/plugins/stop
- Stops an existing, running plugin with the given name.[POST] /api/admin/plugins/start
- Starts an existing, stopped plugin with the given name.[POST] /api/admin/plugins/restart
- Restarts an existing plugin with the given name.[POST] /api/admin/plugins/restart_all
- Restarts all existing plugins.[POST] /api/admin/plugins/metadata/get
- Retrieves the metadata file contents of the plugin with the given name.[POST] /api/admin/plugins/metadata/set
- Overwrites the metadata file contents of the plugin with the given name, with the provided data./api/xxxx
audio APIs to /api/audio/xxxx
/api/soundboardclips
to /api/sound_board/clips
/api/soundboard-play
to /api/sound_board/play
/api/soundboard-random
to /api/sound_board/random
/api/system
to /api/general/system
The web interface is now a part of the new web_server core plugin.
As a result, references to the web interface in the config.ini file has been moved to the web_server plugin's metadata.ini file. The new plugin will provide a REST API and serve the web interface.
This update has a change in dependencies as a result.
There are now multiple requirements files located in the requirements/
directory.
This directory will contain a requirements.txt
file which has the core requirements for the bot,
and additional requirement files for plugins such as the web_server.
pip install -r requirements/requirements.txt
pip install -r requirements/web_server.txt
This change will allow users who want a minimal setup without a web interface
to install the minimum number of dependencies to run the bot.
-webinterface
to -useweb
-ydlproxy
to -mediaproxy
-ydlcookie
to -mediacookie
-noweb
parameter to disable the web interface on startup if it is enabled by default in the plugin metadata.-logtrace
parameter to enable logging stack traces of events.The plugin template generator has been updated to v5.0.0.
If you are a developer looking to make a JJMumbleBot plugin, but don't know where to start, then generate a template plugin like so: python3 JJMumbleBot/utility/plugin_template_generator.py my_example_plugin
.
This plugin will be generated in the JJMumbleBot/user_generated/
directory, and must be placed in the JJMumbleBot/plugins/extensions/
directory to work.
So far, docker images of JJMumbleBot haven't been able to store persistent data for plugins easily.
In this update each plugin will receive it's own directory in the /cfg/plugins/ directory to use for persistent data.
Since the content of this directory is dependent on the plugin, some plugins may opt not to use it.
-logtrace
log ( INFO, [string1, string2, string3], ... )
The bot commands plugin has new commands.
!aliassearch 'search_term'
: Searches and returns a list of aliases that most closely matched the search term.The core commands plugin now has commands that can be used to individually stop/start/restart plugins.
A plugin's ability to be stopped/started/restarted in this way is controlled in the plugin's respective metadata.ini file.
!stopplugin 'plugin_name'
: Stops the plugin by the name provided if it is running.!startplugin 'plugin_name'
: Starts the plugin by the name provided if it is currently inactive.!restartplugin 'plugin_name'
: Restarts the plugin by the name provided if it is currently running.The server tools plugin is now considered a core plugin and has been moved from the extension plugin folder to the core plugin folder.
Some plugin commands have also been shortened so that they are easier to use.
!setuserrconnectionsound
command to !setloginsound
!getuserconnectionsound
command to !getloginsound
!clearuserconnectionsound
command to !clearloginsound
!toggleuserconnectionsound
command to !toggleloginsounds
!setdefaultconnectionsound
command to !setdefaultloginsound
The web interface is now a part of the web_server plugin, which gives it the benefit of being a drag-and-drop optional feature to the bot. This plugin is included by default, but it can be removed by simple deleting it from the plugins list.
localhost:7000/
provides the web interface, and localhost:7000/ws
will provide the socket connection for the interface. [POST] /api/command
: Sends a given command to the bot.{ "text": "!echo test" }
[GET] /api/lastcommand
: Retrieves the most recent command sent to the bot.[POST] /api/pause
: Pauses the audio interface.No request body required
[POST] /api/pause
: Pauses the current track in the audio interface.No request body required
[POST] /api/resume
: Resumes the current track in the audio interface.No request body required
[POST] /api/replay
: Replays the current track in the audio interface.No request body required
[POST] /api/nexttrack
: Skips to the next track in the audio interface queue.No request body required
[POST] /api/decreasevolume
: Decreases the volume of the audio interface by 0.1No request body required
[POST] /api/increasevolume
: Increases the volume of the audio interface by 0.1No request body required
[POST] /api/clearcmdhistory
: Clears the command history of the bot.No request body required
[GET] /api/cmdhistory
: Retrieves the command history of the bot.[POST] /api/loop
: Sets the audio interface to loop tracks.No request body required
[POST] /api/skipto
: Skips to the given track in the audio interface queue.{ "text": "track_index_in_queue" }
[POST] /api/removetrack
: Removes the given track in the audio interface queue.{ "text": "track_index_in_queue" }
[POST] /api/stop
: Stops the current track and clears the queue in the audio interface.No request body required
[GET] /api/plugins
: Retrieves a list of all the active plugins in the bot.[GET] /api/channels
: Retrieves a list of all the server channels in the mumble server.[GET] /api/soundboardclips
: Retrieves a list of all the sound_board clips in local storage.[POST] /api/soundboard-random
: Plays a random soundboard clip from local storage.No request body required
[POST] /api/soundboard-play
: Plays a soundboard clip by the given name from local storage.{ "text": "my_clip_name" }
[GET] /api/system
: Retrieves the system information that the bot is running on.[GET] /api/general/
: Retrieves general bot information such as the name and command token.[GET] /api/general/name
: Retrieves the bot name.[GET] /api/general/token
: Retrieves the bot command token.The sound board plugin has new commands.
!sbrandomquiet
: Plays a random sound clip from local storage without displaying it to the channel chat.!sbrandomquietnow
: Plays a random sound clip from local storage without displaying it to the channel chat and overrides the queue to play immediately.-ip/-port/-password
parameters.!sbnow
override the audio interface queue as expected.!ytsearch
command.on_disconnect
callback to the core bot service.ytsearch
command.config.ini
file or with the -uselogging
launch parameter.With the release of v4.3.0, I've added ALL the options available in the config.ini file to the launch parameters list. This means that any config option can be overridden on launch.
-generatecert
: Automatically generates a certificate for the bot and updates the config.ini file to include the new certificate path.I've worked closely with @kaminascripts to prepare the JJMumbleBot project for Docker container support. There's a lot to cover about this and the bot is easily configurable to run in a docker container. For more information and a guide on setting up the bot with Docker, please check the wiki page: Docker Support
Added 'toggleuserconnectionsound' command to be able to toggle the user connection sound feature without manually editing the config.
!toggleuserconnectionsound
: Enables/disables the user connection sound feature in the metadata file for the plugin.
I have been working with users of JJMumbleBot to get reliable youtube audio playback in the media plugin, and
finer control over the sound_board plugin with each feature requiring different things.
For example, being able to trim downloaded audio clips with the !sbdownload
command in
the sound_board plugin required FFmpeg to work.
However, streaming youtube audio reliably without interruptions or errors required the use
of VLC. I tried getting FFmpeg to do the job of both but it just wasn't reliable and consistent enough.
As a result, to get the functionality and features of both worlds I have made VLC and FFmpeg both a requirement for JJMumbleBot
to allow future development of more advanced audio processing for audio plugins.