idk, first attempt at adding docs ig. Probably gonna break so yea...

This commit is contained in:
iDutchy 2020-12-01 02:25:51 -06:00
parent 6e024871ec
commit 9f54345f5c
4 changed files with 38 additions and 18 deletions

View File

@ -15,7 +15,7 @@ __title__ = 'discord'
__author__ = 'Rapptz' __author__ = 'Rapptz'
__license__ = 'MIT' __license__ = 'MIT'
__copyright__ = 'Copyright 2015-2020 Rapptz' __copyright__ = 'Copyright 2015-2020 Rapptz'
__version__ = '1.6.0.6a' __version__ = '1.6.0.6'
__path__ = __import__('pkgutil').extend_path(__path__, __name__) __path__ = __import__('pkgutil').extend_path(__path__, __name__)
@ -60,9 +60,9 @@ from .raw_models import *
from .team import * from .team import *
from .sticker import Sticker from .sticker import Sticker
VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial') VersionInfo = namedtuple('VersionInfo', 'major minor micro enhanced releaselevel serial')
version_info = VersionInfo(major=1, minor=6, micro=0, releaselevel='alpha', serial=0) version_info = VersionInfo(major=1, minor=6, micro=0, enhanced=6, releaselevel='alpha', serial=0)
try: try:
from logging import NullHandler from logging import NullHandler

View File

@ -121,7 +121,9 @@ class Colour:
@classmethod @classmethod
def random(cls): def random(cls):
"""A factory method that returns a :class:`Colour` with a random value.""" """A factory method that returns a :class:`Colour` with a random value.
.. versionadded:: 1.6"""
return cls(random.randint(0x000000,0xffffff)) return cls(random.randint(0x000000,0xffffff))
@classmethod @classmethod
@ -129,19 +131,6 @@ class Colour:
"""A factory method that returns a :class:`Colour` with a value of ``0``.""" """A factory method that returns a :class:`Colour` with a value of ``0``."""
return cls(0) return cls(0)
@classmethod
def random(cls):
"""A factory method that returns a :class:`Colour` with a random hue.
.. note::
The random algorithm works by choosing a colour with a random hue but
with maxed out saturation and value.
.. versionadded:: 1.6
"""
return cls.from_hsv(random.random(), 1, 1)
@classmethod @classmethod
def teal(cls): def teal(cls):
"""A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``.""" """A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``."""

View File

@ -8,7 +8,7 @@ enhanced-dpy was made to add some extra features that make it just a bit easier.
Custom Features Custom Features
--------------- ---------------
Here are the custom features listed that have been added to enhanced-dpy. You can refer o the changelog to see in what version they were added! Here are the custom features listed that have been added to enhanced-dpy. You can refer to the changelog to see in what version they were added!
- **Documentation URL:** https://enhanced-dpy.readthedocs.io/en/latest/index.html - **Documentation URL:** https://enhanced-dpy.readthedocs.io/en/latest/index.html
- Added ``Guild.bots`` / ``Guild.humans`` - Added ``Guild.bots`` / ``Guild.humans``

31
docs/ext/menus/index.rst Normal file
View File

@ -0,0 +1,31 @@
.. _discord_ext_menus:
``discord.ext.menus``
====================================================
Something something OOOOOOHH built in paginator!
Recipes
---------
Idk, some examples someday
.. _ext_menus_api:
API Reference
---------------
.. autoclass:: discord.ext.menus.Menu()
:members:
.. autoclass:: discord.ext.menus.PageSource()
:members:
.. autoclass:: discord.ext.menus.MenuPages()
:members:
.. autoclass:: discord.ext.menus.ListPageSource()
:members:
.. autofunction:: discord.ext.tasks.menus