From fd9acc13585f49c687ee885041f1f7de1ee82015 Mon Sep 17 00:00:00 2001 From: Mallory Hancock Date: Wed, 27 Sep 2017 14:59:46 -0700 Subject: [PATCH] add examples --- examples/ph.py | 4 ++++ examples/plugins/test.py | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 examples/ph.py create mode 100644 examples/plugins/test.py diff --git a/examples/ph.py b/examples/ph.py new file mode 100644 index 0000000..acf7d01 --- /dev/null +++ b/examples/ph.py @@ -0,0 +1,4 @@ +import pinhook.bot + +ph = pinhook.bot.Bot(['#arch-dev'], 'ph-bot', 'localhost', ops=['archangelic']) +ph.start() diff --git a/examples/plugins/test.py b/examples/plugins/test.py new file mode 100644 index 0000000..58c7e86 --- /dev/null +++ b/examples/plugins/test.py @@ -0,0 +1,6 @@ +import pinhook.plugin + +def test(**kwargs): + return pinhook.plugin.message("Test") + +pinhook.plugin.add_plugin('!test', test)