Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
functionally-identical hangouts bot plugins (version 2.4 and above)
"""standard plugin
more documentation: __wikilink__
"""
import plugins
def _initialise(bot):
plugins.register_admin_command(["noop_standard"])
plugins.register_handler(_handle_nothing)
def noop_standard(bot, event, *args):
print("i did nothing!")
def _handle_nothing(bot, event, command):
print("i handled nothing, but a message just went by!")
"""decorator-based plugin
pattern is nearly 1-to-1 compatible with original hangupsbot by xmikos
https://github.com/xmikos/hangupsbot
more documentation: __wikilink__
"""
import hangups
from handlers import handler
from commands import command
@command.register(admin=True)
def noop_alternate(bot, event, *args):
print("i did nothing!")
@handler.register(priority=5, event=hangups.ChatMessageEvent)
def _handle_nothing_xmikos(bot, event):
print("i handled nothing, but a message just went by!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.