From a805472f47ba49cc1051b91b75dc9d9deaaf2f89 Mon Sep 17 00:00:00 2001 From: Sergei Akhmatdinov Date: Sat, 8 Feb 2020 10:49:01 -0500 Subject: [PATCH] add one-time paste --- pbbot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pbbot.py b/pbbot.py index e517b15..1e206ad 100755 --- a/pbbot.py +++ b/pbbot.py @@ -36,6 +36,11 @@ class PBBot(sleekxmpp.ClientXMPP): output = subprocess.check_output(['/bin/env', 'pbincli', \ 'send', '--text', arg]).decode('utf-8') msg.reply(output).send() + elif "!bpaste" in msg['body']: + arg = msg['body'].replace('!paste', '').strip() + output = subprocess.check_output(['/bin/env', 'pbincli', \ + 'send', '-B', '--text', arg]).decode('utf-8') + msg.reply(output).send() elif "!get" in msg['body']: arg = msg['body'].replace('!get', '').strip() output = subprocess.check_output(['/bin/env', 'pbincli' \