Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BobDotCom committed Apr 5, 2022
1 parent ed5b7bc commit 66b17ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions discord/ext/bridge/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def decorator(func) -> BridgeCommand:
class Bot(BotBase, ExtBot):
"""Represents a discord bot, with support for cross-compatibility between command types.
This class is a subclass of :class:`commands.Bot` and as a result
anything that you can do with a :class:`commands.Bot` you can do with
This class is a subclass of :class:`.ext.commands.Bot` and as a result
anything that you can do with a :class:`.ext.commands.Bot` you can do with
this bot.
.. versionadded:: 2.0
Expand All @@ -89,7 +89,7 @@ class Bot(BotBase, ExtBot):

class AutoShardedBot(BotBase, ExtAutoShardedBot):
"""This is similar to :class:`.Bot` except that it is inherited from
:class:`commands.AutoShardedBot` instead.
:class:`.ext.commands.AutoShardedBot` instead.
.. versionadded:: 2.0
"""
Expand Down
6 changes: 6 additions & 0 deletions discord/ext/bridge/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,16 @@


class BridgeSlashCommand(SlashCommand):
"""
A subclass of :class:`.SlashCommand` that is used to implement bridge commands.
"""
...


class BridgeExtCommand(Command):
"""
A subclass of :class:`.ext.commands.Command` that is used to implement bridge commands.
"""
...


Expand Down
13 changes: 11 additions & 2 deletions docs/ext/bridge/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This page includes the API reference/documentation for the module, but only cont
detailed guide on how to use this, see our `discord.ext.bridge guide <https://guide.pycord.dev/extensions/bridge>`_.

.. note::
``ext.bridge`` requires message content intent to be enabled in order to use it.
``ext.bridge`` requires the message content intent to be enabled, as it uses the ``ext.commands`` extension.

Example usage:

Expand All @@ -19,7 +19,10 @@ Example usage:
import discord
from discord.ext import bridge
bot = bridge.Bot(command_prefix="!")
intents = discord.Intents.default()
intents.message_content = True
bot = bridge.Bot(command_prefix="!", intents=intents)
@bot.bridge_command()
async def hello(ctx):
Expand Down Expand Up @@ -75,6 +78,12 @@ Commands
.. automethod:: discord.ext.bridge.bridge_command()
:decorator:

.. autoclass:: discord.ext.bridge.BridgeExtCommand
:members:

.. autoclass:: discord.ext.bridge.BridgeSlashCommand
:members:

Context
~~~~~~~

Expand Down

0 comments on commit 66b17ea

Please sign in to comment.