Add help, bpaste without command

This commit is contained in:
[Alien] 2020-02-09 01:15:28 +02:00
parent 1888f25994
commit 723455d17a
1 changed files with 6 additions and 1 deletions

View File

@ -49,8 +49,13 @@ class PBBot(sleekxmpp.ClientXMPP):
elif "!echo" in msg['body']:
arg = msg['body'].replace('!echo', '').strip()
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:
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__':
# Setup the command line arguments.