Skip to content

esabouraud/discomblebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

111 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discomblebot

ci status

A 2-in-1 mostly useless Mumble and Discord Bot written in Python 3.8.

A Mumble bot monitors users presence on a Mumble server and sends status messages to a Discord bot, which posts them in a channel, and vice versa.

It depends on:

Installation

Prerequisites

Download and install the protocol buffer compiler.

General

git clone https://github.com/azlux/pymumble.git
pip install -U -r pymumble/requirements.txt
export PYTHONPATH=$(pwd)/pymumble
git clone https://github.com/esabouraud/discomblebot.git
cd discomblebot
pip install -U -r requirements.txt
protoc --python_out=. discomblebot/bot_msg.proto

Windows

A 32-bit version of Python 3 is required. pymumble depends on opuslib which in turn depends on libopus-0.dll, which is only available as a 32-bit DLL. Thus, some tinkering is necessary to make pymumble work on Windows.

git clone https://github.com/azlux/pymumble.git
git clone https://github.com/esabouraud/opuslib.git -b windows
git clone https://github.com/esabouraud/discomblebot.git
py -3-32 -m pip install -U -r pymumble/requirements.txt discomblebot/requirements.txt
set PYTHONPATH=%cd%\pymumble;%cd%\opuslib
set PATH=%PATH%;%cd%\discomblebot\libs
cd discomblebot
protoc --python_out=. discomblebot\bot_msg.proto

Download libopus and unzip into discomblebot/libs.

Usage

Interactive

Copy conf/discomble.conf.sample into conf/discomble.conf and fill in the parameters.

python -m discomblebot -f conf/discomble.conf -i

Type !status + Enter to trigger status messages from bots Type !quit + Enter or Ctrl-C to exit.

Non-interactive

python -m discomblebot -f conf/discomble.conf

Docker

Build

git clone https://github.com/esabouraud/discomblebot.git
cd discomblebot
docker build -t discomblebot:latest .

Run as daemon

Volume usage can be avoided by setting the content of the configuration file into the DISCOMBLE_CONF environment variable.

docker run -d -e DISCOMBLE_CONF=$(<conf/discomble.conf) discomblebot

Todo

  • Find out how to stop using globals in discord bot

About

2-in-1 Mumble and Discord Bot

Resources

License

Stars

Watchers

Forks

Packages

No packages published