Skip to content

Commit

Permalink
Add logging docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaster3558 committed Oct 6, 2022
1 parent 25d9387 commit c9d085f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aiointeractions/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class InteractionsApp:
If not passed, a new web application instance will be created.
route: :class:`str`
The route to add the interactions handler to. Defaults to ``/interactions``.
.. note:: You can use ``discord.utils.setup_logging()`` for basic logging.
"""

def __init__(
Expand Down
5 changes: 5 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ How do I set the interactions endpoint?
1. Open the Discord Developer Portal.
2. Navigate to the **General Information** page in your chosen application.
3. Now find **Interactions Endpoint URL** and set the url. Make sure it ends with ``/interactions``.

Why isn't ``on_ready`` firing?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``on_ready`` is fired when the cache is ready but since the bot is
not connected to the gateway it will never be ready. Consider using ``setup_hook`` instead.
2 changes: 2 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Example
tree = discord.app_commands.CommandTree(client)
app = aiointeractions.InteractionsApp(client)
discord.utils.setup_logging()
@tree.command()
async def ping(interaction: discord.Interaction) -> None:
await interaction.response.send_message('Pong!')
Expand Down

0 comments on commit c9d085f

Please sign in to comment.