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.4.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for synochatbot-2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046d05da4865f648395b64963f5c88504cf27a000e49fa4a852b357b011744e0 |
|
MD5 | 52dc38bea7c2fccabcca2206a91aeb56 |
|
BLAKE2b-256 | 05892278d2b274faa8f54acc69952a504b0fff359c437ea31fee4f44982690e7 |