Built-in plugins

The following plugins are included in the Omnipresence distribution.

Some plugins have additional dependencies beyond what the Omnipresence setup script automatically installs for you. They are listed in the documentation below, and each such plugin in the Omnipresence source distribution also has a requirements.txt file in its directory that can be used with pip:

$ pip install -r omnipresence/plugins/url/requirements.txt

.help

Event plugins for providing command help.

class omnipresence.plugins.help.Default[source]

Show detailed help for other commands, or list all available commands if no argument is given.

Alice:help
Bot:Available commands: alpha, beta, help. For further help, use help keyword. To redirect a command reply to another user, use command > nick.
Alice:help alpha
Bot:alpha argument - Help for command alpha.

.more

Event plugins for reading command reply buffers.

class omnipresence.plugins.more.Default[source]

Show additional text from a user’s reply buffer.

Brian:count
Bot:1
Brian:more
Bot:2
Brian:more
Bot:3

In public channels, an optional argument can be passed to view the contents of another user’s reply buffer.

Alice:count
Bot:alice: 1
Brian:more alice
Bot:brian: 2

.anidb

Event plugins for searching AniDB.

class omnipresence.plugins.anidb.Default[source]

Look up an anime title on AniDB.

Alice:anidb bakemonogatari
Bot:http://anidb.net/a6327Bakemonogatari — TV Series, 12 episodes from 2009-07-03 to 2009-09-25 — rated 8.43 (7443)

.autorejoin

Event plugins for automatically rejoining channels after kicks.

class omnipresence.plugins.autorejoin.Default[source]

Automatically rejoin channels after being kicked from them.

.autovoice

An event plugin that automatically voices users as they join a channel, unless that channel is moderated.

class omnipresence.plugins.autovoice.Default[source]

Automatically voice users as they enter a channel, unless moderation is set with the +m channel mode. Useful for managing a sudden influx of new users.

Note that Omnipresence almost certainly has to have channel operator privileges (+o) in order for this plugin to work.

.dice

Event plugins for storing banks of die rolls used in role-playing games.

class omnipresence.plugins.dice.Default[source]

Manage dice pools.

The new, add, use, and clear subcommands affect a per-user bank of die rolls, while roll is used for one-off rolls that should not be added to the bank.

Alice:dice new 4d6
Bot:Rolled 1 4 5 6 = 16. Bank now has 1 4 5 6 = 16.
Brian:dice new 4d6
Bot:Rolled 2 3 3 4 = 12. Bank now has 2 3 3 4 = 12.
Alice:dice
Bot:Bank has 1 4 5 6 = 16.
Alice:dice show brian
Bot:Bank has 2 3 3 4 = 12.
Brian:dice roll 2d20
Bot:Rolled 7 15 = 22.
Brian:dice use 3 3
Bot:Used 3 3 = 6. Bank now has 2 4 = 12.
Alice:dice clear
Bot:Bank cleared.
banks = None

User die banks, keyed by a (channel, nick) tuple.

random = None

The instance of random.Random used for die rolls. This is overridden for deterministic testing.

roll_dice(dice)[source]

Return random rolls for the dice given as an iterable containing some combination of individual die groups as strings, such as "2d6". Integers are accepted as dice; they “roll” to themselves.

.geonames

Event plugins for GeoNames services.

The geonames.username settings variable must be set to a valid GeoNames API username for them to function.

class omnipresence.plugins.geonames.Time[source]

Look up the current time in a world location.

Brian:time beijing
Bot:Beijing, Beijing, China (39.91, 116.40): 2015-08-14 11:10

If pytz is installed, case-sensitive tz database names are also supported.

Alice:time UTC
Bot:UTC (tz database): 2015-08-14 03:10
class omnipresence.plugins.geonames.Weather[source]

Look up weather conditions in a world location.

Brian:weather london
Bot:London, England, United Kingdom (51.51, -0.13): 19.0°C/66.2°F, broken clouds, 93% humidity from London City Airport (EGLC) as of 26 minutes ago

.google

Event plugins for Google searches.

class omnipresence.plugins.google.Default[source]

Perform a Google Web search.

The google.key and google.cx settings variables must be set to valid Google Custom Search API credentials. For more information on setting up a Custom Search account, see the Stack Overflow topic “What are the alternatives now that the Google web search API has been deprecated?”

Alice:google far-out son of lung
Bot:https://www.youtube.com/watch?v=7g0sNbHWf9k — FSOL - Far Out Son Of Lung - YouTube: Aug 19, 2006 ... Far Out Son Of Lung And The Ramblings Of A Madman. (+886999 more)

.mstranslate

Event plugins for Microsoft Translator.

class omnipresence.plugins.mstranslate.Default[source]

Translate text between languages with Microsoft Translator.

The mstranslate.subscription_key settings variable must be set to a valid Microsoft Cognitive Services subscription key. For more information, see the Text Translation API documentation.

The mstranslate.default_target settings variable is an optional two-letter language code specifying the target language to use if the user does not specify one. It defaults to en for English.

Alice:mstranslate hola
Bot:Hello
Alice:mstranslate hola de:
Bot:Hallo

.url

Event plugins for previewing the content of mentioned URLs.

class omnipresence.plugins.url.Default[source]

Fetch the titles of URLs mentioned in normal messages or actions.

Requires Little Brother.

Charlie:http://www.example.com/ is an example site
Bot:[www.example.com] Example Domain
Alice:http://www.example.org/ and http://www.example.net/ too
Bot:[www.example.org] Example Domain
Bot:[www.example.net] Example Domain

.vndb

Event plugins for searching the Visual Novel Database.

class omnipresence.plugins.vndb.Default[source]

Look up a visual novel title on the Visual Novel Database.

Brian:vndb ever17
Bot:https://vndb.org/v17Ever17 -The Out of Infinity-, first release 2002-08-29 — rated 8.71 (3763) (+1 more)

.wwwjdic

Event plugins for searching WWWJDIC.

class omnipresence.plugins.wwwjdic.Default[source]

Define a Japanese word or phrase using Jim Breen’s WWWJDIC.

If Waapuro is installed, Nihon-shiki romanizations are provided alongside the kana spellings.

Alice:wwwjdic kotoba
Bot:言葉(P);詞;辞 [ことば (kotoba) (P); けとば (ketoba) (言葉)(ok)] (n) (1) (See 言語) language; dialect; (2) (See 単語) word; words; phrase; term; expression; remark; (3) speech; (manner of) speaking; (P) (+28 more)