docs: Small README touch-up
This commit is contained in:
parent
dfba2a26df
commit
a7973459c5
12
README.md
12
README.md
@ -75,7 +75,10 @@ is just for turning the class into a singleton. What's required is the
|
|||||||
toplevel constant `NAME`! It is the name of the module as the same time
|
toplevel constant `NAME`! It is the name of the module as the same time
|
||||||
the "command". mira will pass all messages that start with the value of
|
the "command". mira will pass all messages that start with the value of
|
||||||
`NAME` to the `on_command` function. It's parameters are the message body
|
`NAME` to the `on_command` function. It's parameters are the message body
|
||||||
whitespace separated (`cmd`) and the original `aioxmpp` message object (`msg`)
|
whitespace separated (`cmd`) and the original `aioxmpp` message object (`msg`).
|
||||||
|
|
||||||
|
If you want to add configuration options to your bot, you can use the module's
|
||||||
|
`get_option(key, default=None)` function, which works exactly like `dict.get(...)`.
|
||||||
|
|
||||||
If you have subcommands, like "new something1" and "new something2", then you can
|
If you have subcommands, like "new something1" and "new something2", then you can
|
||||||
use a subcommand table. It is just a dictionary that tells mira which function
|
use a subcommand table. It is just a dictionary that tells mira which function
|
||||||
@ -142,6 +145,13 @@ If your users should be able to subscribe to certain events, then you can use th
|
|||||||
`SubscriptionManager`, available via the module's `_sum` property. It exposes a lot more
|
`SubscriptionManager`, available via the module's `_sum` property. It exposes a lot more
|
||||||
functions, so it is probably the better to just look at it's code at `mira/subscription.py`.
|
functions, so it is probably the better to just look at it's code at `mira/subscription.py`.
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
If the test module `mira.modules.test` is not advanced enough, then you can find more examples here:
|
||||||
|
|
||||||
|
- [JANINE](https://git.polynom.me/PapaTutuWawa/JANINE)
|
||||||
|
- [My personal modules](https://git.polynom.me/PapaTutuWawa/mira-modules)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
See `LICENSE`.
|
See `LICENSE`.
|
Loading…
Reference in New Issue
Block a user