Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
WesR committed Jan 28, 2022
1 parent c742dba commit d9160b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Ask questions in the matrix chat [#halcyon:blackline.xyz](https://matrix.to/#/#h
- join_room(roomID)
- download_media(mxc)
- upload_media(fileBuffer, fileName)
- send_image(roomID, fileBuffer, fileName, generate_blurhash, generate_thumbnail)
- Room and message objects for incoming events events
- Basic documentation (Check [usage.md](./usage.md))

Expand All @@ -33,6 +34,9 @@ Ask questions in the matrix chat [#halcyon:blackline.xyz](https://matrix.to/#/#h

## Example bot code
See more example and message object info in [usage.md](./usage.md)
+ [Example message bot](./examples/basic_message_bot.py), looks for a phrase and replies with a phrase
+ [Example image bot](./examples/basic_image_bot.py), looks for a phrase and replies with an image
+ [Image Archive bot](./examples/image_archive_bot.py), looks for images, and saves them
```python
import halcyon
import requests, json
Expand Down
2 changes: 1 addition & 1 deletion src/halcyon/halcyon.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ async def send_image(self, roomID, fileBuffer, fileName, generate_blurhash=True,
@param roomID String the room to send to
@param file BytesIO The file in bytes format
@param fileName String the file name of the file
@param generate_blurhash Bool Generate a Bluehash for the image. This is a blur used as filler while the image loads
@param generate_blurhash Bool Generate a Blurhash for the image. This is a blur used as filler while the image loads
@param generate_thumbnail Bool Set to true to automatically downsize images over 640x640
"""
fileBuffer = io.BytesIO(fileBuffer)
Expand Down
4 changes: 2 additions & 2 deletions usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if __name__ == '__main__':

[Example message bot](./examples/basic_message_bot.py), looks for a phrase and replies with a phrase
[Example image bot](./examples/basic_image_bot.py), looks for a phrase and replies with an image
[Image Archive bot](./examples/image_archive_bot.py), Looks for images, and saves them
[Image Archive bot](./examples/image_archive_bot.py), looks for images, and saves them

## halcyon function documentation
+ `client.send_message`
Expand Down Expand Up @@ -100,7 +100,7 @@ if __name__ == '__main__':
+ @param `roomID` String the room to send to
+ @param `fileBuffer` BytesIO The file in bytes format
+ @param `fileName` String the file name of the file
+ @param `generate_blurhash` Bool Generate a Bluehash for the image. This is a blur used as filler while the image loads. Defaults True
+ @param `generate_blurhash` Bool Generate a Blurhash for the image. This is a blur used as filler while the image loads. Defaults True
+ @param `generate_thumbnail` Bool Set to true to automatically downsize images over 640x640. Defaults True

## halcyon event handlers
Expand Down

0 comments on commit d9160b0

Please sign in to comment.