Add help, bpaste without command
This commit is contained in:
parent
1888f25994
commit
723455d17a
7
pbbot.py
7
pbbot.py
|
@ -49,8 +49,13 @@ class PBBot(sleekxmpp.ClientXMPP):
|
||||||
elif "!echo" in msg['body']:
|
elif "!echo" in msg['body']:
|
||||||
arg = msg['body'].replace('!echo', '').strip()
|
arg = msg['body'].replace('!echo', '').strip()
|
||||||
msg.reply("Thanks for sending\n" + arg).send()
|
msg.reply("Thanks for sending\n" + arg).send()
|
||||||
|
elif "!help" in msg['body']:
|
||||||
|
msg.reply("Commands (prefix with !): help paste bpaste echo get").send()
|
||||||
else:
|
else:
|
||||||
msg.reply("Commands (prefix with !): paste bpaste echo get").send()
|
arg = msg['body'].strip()
|
||||||
|
output = subprocess.check_output(['env', 'pbincli', \
|
||||||
|
'send', '-B', '--text', arg]).decode('utf-8')
|
||||||
|
msg.reply(output).send()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Setup the command line arguments.
|
# Setup the command line arguments.
|
||||||
|
|
Loading…
Reference in New Issue