Document Bot attributes/functions

Closes https://git.autonomic.zone/decentral1se/xbotlib/issues/35.
This commit is contained in:
Luke Murphy 2021-01-19 08:24:51 +01:00
parent 5b307cfe95
commit 73df47eb45
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 21 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# xbotlib x.x.x (UNRELEASED) # xbotlib x.x.x (UNRELEASED)
# xbotlib 0.13.1 (2021-01-19)
- Document `Bot` attributes/functions ([#35](https://git.autonomic.zone/decentral1se/xbotlib/issues/35))
# xbotlib 0.13.0 (2021-01-18) # xbotlib 0.13.0 (2021-01-18)
- Allow commands to be detected in all parts of the message - Allow commands to be detected in all parts of the message

View File

@ -24,6 +24,7 @@ on and are still going on in
- [Bot.group(message)](#bot-group-message) - [Bot.group(message)](#bot-group-message)
- [Bot.serve(request)](#bot-serve-request) - [Bot.serve(request)](#bot-serve-request)
- [SimpleMessage](#simplemessage) - [SimpleMessage](#simplemessage)
- [Bot](#bot)
- [Working with your bot](#working-with-your-bot) - [Working with your bot](#working-with-your-bot)
- [Documentation](#documentation) - [Documentation](#documentation)
- [Commands](#commands) - [Commands](#commands)
@ -121,6 +122,22 @@ Attributes:
- **type**: the type of message - **type**: the type of message
- **url**: The URL of a sent file - **url**: The URL of a sent file
### Bot
> Bot.reply(message, to=None, room=None)
Send a reply back.
Arguments:
- **message**: the message that is sent
- **to**: the user to send the reply to
- **room**: the room to send the reply to
Other useful attributes on the `Bot` class are:
- **self.db**: The [Redis database](#redis-key-value-storage) if you're using it
## Working with your bot ## Working with your bot
### Documentation ### Documentation