Review doc
This commit is contained in:
parent
b8deded736
commit
8be96abc44
|
@ -7,4 +7,8 @@ Bot
|
|||
:ignore-module-all:
|
||||
|
||||
.. autoclass:: Bot
|
||||
|
||||
.. autoclass:: BotCommand
|
||||
.. autoexception:: WrongArg
|
||||
.. autofunction:: check_args
|
||||
.. autofunction:: convert
|
||||
.. autofunction:: parse
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
Commands
|
||||
--------
|
||||
.. automodule:: irc_api.commands
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:ignore-module-all:
|
||||
|
||||
.. autodecorator:: command
|
||||
.. autodecorator:: channel
|
||||
.. autodecorator:: every
|
||||
.. autodecorator:: on
|
||||
.. autodecorator:: user
|
||||
.. autofunction:: auto_help
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
History
|
||||
-------
|
||||
.. automodule:: irc_api.history
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:ignore-module-all:
|
||||
|
||||
.. autoclass:: History
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
IRC
|
||||
---
|
||||
.. automodule:: irc_api.irc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:ignore-module-all:
|
||||
|
||||
.. autoclass:: IRC
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
Message
|
||||
-------
|
||||
.. automodule:: irc_api.message
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
:ignore-module-all:
|
||||
|
||||
.. autoclass:: Message
|
||||
|
|
|
@ -35,9 +35,12 @@ class Bot:
|
|||
Methods
|
||||
-------
|
||||
.. automethod:: __init__
|
||||
.. automethod:: start
|
||||
.. automethod:: send
|
||||
.. automethod:: add_command
|
||||
.. automethod:: add_commands
|
||||
.. automethod:: add_commands_module
|
||||
.. automethod:: remove_commands
|
||||
.. automethod:: send
|
||||
.. automethod:: start
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
@ -232,9 +235,9 @@ class BotCommand:
|
|||
The description of the BotCommand. By default, the function's docstring is used.
|
||||
cmnd_type : int, public
|
||||
The type of the command.
|
||||
- if ``cmnd_type = 0``, the command is triggered on an event.
|
||||
- if ``cmnd_type = 1``, the command is a named command.
|
||||
- if ``cmnd_type = 2``, the command is a routine automatically triggered.
|
||||
* if ``cmnd_type = 0``, the command is triggered on an event.
|
||||
* if ``cmnd_type = 1``, the command is a named command.
|
||||
* if ``cmnd_type = 2``, the command is a routine automatically triggered.
|
||||
bot : irc_api.bot.Bot, public
|
||||
The bot the command belongs to.
|
||||
"""
|
||||
|
@ -253,9 +256,9 @@ class BotCommand:
|
|||
The description of the BotCommand. By default, the function's docstring is used.
|
||||
cmnd_type : int
|
||||
The type of the command.
|
||||
- if ``cmnd_type = 0``, the command is triggered on an event.
|
||||
- if ``cmnd_type = 1``, the command is a named command.
|
||||
- if ``cmnd_type = 2``, the command is a routine automatically triggered.
|
||||
* if ``cmnd_type = 0``, the command is triggered on an event.
|
||||
* if ``cmnd_type = 1``, the command is a named command.
|
||||
* if ``cmnd_type = 2``, the command is a routine automatically triggered.
|
||||
"""
|
||||
self.name = name
|
||||
self.func = func
|
||||
|
|
|
@ -9,6 +9,11 @@ class History:
|
|||
The content of the History.
|
||||
limit : int, private
|
||||
The maximum number of messages that the History stored.
|
||||
|
||||
Methods
|
||||
-------
|
||||
.. automethod:: add
|
||||
.. automethod:: get
|
||||
"""
|
||||
def __init__(self, limit: int):
|
||||
"""Constructor method."""
|
||||
|
|
|
@ -21,7 +21,17 @@ class IRC:
|
|||
The IRC's socket.
|
||||
inbox : Queue, private
|
||||
Queue of the incomming messages.
|
||||
handler : Thread, private
|
||||
handler : Thread, private
|
||||
|
||||
Methods
|
||||
-------
|
||||
.. automethod:: __init__
|
||||
.. automethod:: connection
|
||||
.. automethod:: join
|
||||
.. automethod:: receive
|
||||
.. automethod:: send
|
||||
.. automethod:: waitfor
|
||||
|
||||
"""
|
||||
def __init__(self, host: str, port: int):
|
||||
"""Initialize an IRC wrapper.
|
||||
|
|
Loading…
Reference in New Issue