About
This extension's purpose is of adding a "docs" command, its purpose is to help documenting in chat.
How To Load It
from disnake.ext import commands
bot = commands.Bot(...)
bot.load_extension('docs')
bot.run(...)
How To Add More Items
To add more items besides python and disnake, you can subclass doc.cog.Docs
Example:
from disnake.ext import commands
from docs import cog
class MyCog(cog.Docs):
def __init__(self, bot):
super().__init__(bot)
# Now we set the new items
# NOTE: It must be a list of tuples or a tuples of tuples
self.items = (
('disnake', 'https://disnake.readthedocs.io/en/latest/'),
('python', 'https://docs.python.org/3/'),
('aiohttp', 'https://aiohttp.readthedocs.io/en/stable/'),
)
# NOTE: You must also add `disnake` and `python` manually, otherwise
# it will only show the items you put.
bot = commands.Bot(...)
bot.add_cog(MyCog(bot))
bot.run(...)
Inspired By
python-discord/bot/bot/exts/info/doc - The community bot for the Python Discord community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
disnake-docs-1.2.2.tar.gz
(33.7 kB
view details)
File details
Details for the file disnake-docs-1.2.2.tar.gz.
File metadata
- Download URL: disnake-docs-1.2.2.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75cb4fa6bfb66b1ef6759f9c2a96058ad6c314d244925c17d8ab29c6612f9aa7
|
|
| MD5 |
8cbceb286c256b7c733e6571e80bfa8f
|
|
| BLAKE2b-256 |
726d80a8690ef4a4d97d6ccda88933036a8dafdd41f8c4b3e02f0f2d86650341
|