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)
Post arguments like this: arguments arg1data:::arg2data:::arg3data:::arg4data:::arg5data
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.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for synochatbot-2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df391d3936bffef9dcabd5272791012aa12e404c497994eb097208848ff0348 |
|
MD5 | e3b9ea4802815d83598400d2dcf765b9 |
|
BLAKE2b-256 | 3478d6b8d9a8e0306417b4fcd7a7fa0542aa96b6e684c996dbbad0d1776272c5 |