A discord.py like thing but for synology chat
Project description
A python library like discord.py but for synology chat.
It allows you to create a bot that can be used to respond to messages in synology chat.
Install:
pip install synochatbot
Usage:
import synochatbot as synochat
outgoing_webhook = "your url"
instance = synochat.instance()
@instance.message(alias="return_full_message")
def say_hi(message):
return message
@instance.message(alias='return_username')
def return_test(message, command=None):
return message.username
@instance.message(alias='arguments', arguments=5) #can have unlimited arguments
def return_test(message, arg1, arg2, arg3, arg4, arg5):
return arg1 + arg2 + arg3 + arg4 + arg5
# ... (other message handlers)
synochat.run_bot(instance, outgoing_webhook, incomming_webhook_token)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
synochatbot-2.5.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for synochatbot-2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3a36a30c9f7c04ac921f00e0512b589942d3bc710ae9c2750ae1503f585cd57 |
|
MD5 | 8f048970b7335c993d82c2a3d854815b |
|
BLAKE2b-256 | dfd9959c49fcbce628ee47f4a052d50b98c7baae3e3609c8632cec76aaf92f28 |