-
Notifications
You must be signed in to change notification settings - Fork 2
Authoring Bot Extensions
Innocent Bystander edited this page Aug 17, 2015
·
48 revisions
The current framework version is 2.7, please read the Framework Overview
The bot supports two kinds of "extensions": plugins and sinks:
-
plugins extend bot functionality and is the recommended way to develop portable code that can be easily shared with other developers
- Article: [ ver >= 2.7 ] Access Control with Tags
-
Developer Article: Plugin Authoring for 2.4 and above
- Developer Article: Migrating older plugins for 2.4 and above
-
chance plugin: adding simple commands and custom triggers:
/bot diceroll
,/bot coinflip
,/me rolls dice
,/me flips a coin
-
easteregg plugin: adding commands with parameters:
/bot easteregg <parameters ...>
- _example_memory.py plugin: reading and writing user and conversation memory
- _example_printrenames plugin: watching group chat renames
- _example_watchmembers plugin: monitoring users joining and leaving chat
- _unittest_statusevents plugin: monitoring user typing and watermark (last read) update
- humor_hangoutcalls plugin: detecting start and end of video/voice call
- using the webbridge class as a base for building plugins that communicate with other web-based services such as the webbridge_hubot plugin, which essentially extends hangoutsbot with HUBOT commands
- using
plugins.start_asyncio_task()
to start a long-running periodic process such as updating the bot's watermark in the BotAlive Plugin
-
sinks (a.k.a. receivers/listeners), process web requests from external sources
- Developer Article: Sinks for 2.4 and above
- Article: Google Scripts Sink (source code)
- Article: GitHub Web Hook Sink (source code)
- Article: GitLab Web Hook Sink (source code)
These items are preserved for record-keeping purposes.
-
sinks
-
[OBSOLETE/REMOVED]
source code: interbot-messaging (receive replies from Hubot)(advanced)
-
[OBSOLETE/REMOVED]
-
hooks provide low-level
access to bot events such as when a chat is received, renamed, etc.
- hooks are DEPRECATED - recommend using plugins instead as plugins are more flexible and portable; with identical or even better functionality
- examples/references:
- [hooks introduction for developers] (https://github.com/hangoutsbot/hangoutsbot/wiki/Hooks)
-
[OBSOLETE/REMOVED]
source code: [log all chat events into file] (https://github.com/hangoutsbot/hangoutsbot/blob/master/hangupsbot/hooks/chatlogger/writer.py) -
[OBSOLETE/REMOVED]
source code: [interbot-messaging (sends chats to Hubot)] (https://github.com/hangoutsbot/hangoutsbot/blob/master/hangupsbot/hooks/hubotsend/post.py) (advanced)
Plugin List | Developer Reference: [ Intro | Plugins | Sinks | In-built Functionality | [Configuration] (Configuration) ]