A simple bot for TeamSpeak 3 written in Python.
Just run TS3_PyBot.py
.
python TS3_PyBot.py
The bot should now be running. Error messages will be displayed in the same console window.
The following libraries need to be installed:
The bot requires Python 3.3+.
The settings.json
file contains the bot configuration. In addition to the server address, the bot also requires Server Query credentials. The default server query port is 10011
. The server ID will have to be edited if there are multiple virtual servers. It can be found by logging in on the server through telnet, then running the serverlist
command, and finally looking up the desired virtualserver_id
.
The scripts
list defines not only which scripts will run, but also their relative priority. Scripts higher on the list take precedence over the ones following them.
All bot functionality is defined through scripts. They are located in the lib
folder and all inherit from the AbstractScript
class. Currently, the following scripts exist:
When the HelpBot
script is active, more information about the running scripts can be displayed in the chat:
.help
: Displays a list of the all active scripts.
.help <script_name>
: Displays more information about one script. (e.g. .help helpbot
)
The trigger word for each script is defined in its respective file, through the trigger
variable.
Script | Trigger | Description |
---|---|---|
- | .mute |
Mute bot. |
- | .unmute |
Unmute bot. |
- | .kick |
Kick bot from server. |
ButtBot |
- | Replaces a random word in a posted text message with butt. |
CleverBot |
gote |
Chat with Cleverbot. |
EightBall |
.8ball |
The 8ball will answer one question. |
HelpBot |
.help |
Get help about running scripts. |
QuoteBot |
.quote |
Add, remove, access your quotes. |
ReplyBot |
many | Reply to certain keywords. |
BenisBot |
.benis |
Benisify a phrase. |
ChoiceBot |
.choice |
Choose: a, b, c... |
MateBot |
mate ... |
Respond to variations of "mate". |
DieBot |
.roll |
Roll one or more N-sided dice. |