add one-time paste

This commit is contained in:
Sergei Akhmatdinov 2020-02-08 10:49:01 -05:00
parent 89eacedc76
commit a805472f47
1 changed files with 5 additions and 0 deletions

View File

@ -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' \