d-dd / Yukari

A Cytube bot written in Twisted (Python)
4 stars 3 forks source link
cytube cytube-bot python twisted

Yukari - A CyTube Bot

Commands

A list of commands can be found at https://github.com/d-dd/Yukari/blob/master/commands.md

About

Yukari is a CyTube bot written for a Vocaloid channel. Thus some of the features will be unnecessary for most channels. For a general purpose bot, consider using NuclearAce's https://github.com/nuclearace/CytubeBot. However, you can always delete (or prefix a plugin filename with _) a plugin file to prevent Yukari from importing the plugin.

Dependencies:

Python 2.x
Twisted
Twisted Autobahn

Requirements:

A CyTube server to connect to
An account with admin rank or higher (3+) in the channel Yukari will run.

Installation:

Create the SQLite database:

python createDb.py

Edit the settings.cfg.
Edit ext/external.js and upload it somewhere. If the channel already has custom js, just copy-paste the contents.

In CyTube

Yukari needs to have admin rank or higher (3+) because she modifies the channel javascript frequently.
Set a filter:

@3939([^`]+)#3939, g, $1

This is for the gray server-like messages when users queue media to the playlist, and when Yukari removes something from the playlist.
Edit italics filter:

(^| )_([^_].+?[^_])_($| ), g, \1\<em>\2\</em>\3
Set a filter:
_, g, 

Put the url of external.js into the external JS box.

Usage:

Tacfile.py is a Twisted application file that can be run with twistd. For example,

twistd -noy tacfile.py
Yukari is being developed and tested in a Linux environment, so it may have problems running on Windows or Mac.

Telnet:

telnet localhost [port]

Uses Twisted's Manhole module to access Yukari's names directly. This is very useful for debugging. The instance of Yukari is y, so for example, dir(y) will list all of her names and y.sendChats('Hello!') will send messages to CyTube and IRC (if connected).

Optional

Youtube v3 API key
IRC account

Features

Yukari is similar to Desuwa's CyNaoko in terms of capabilities, and many of the features are a direct port of CyNaoko.

Main Differences from CyNaoko