From 9f54345f5cf87bffa017f1b177b320e94c03db3c Mon Sep 17 00:00:00 2001 From: iDutchy Date: Tue, 1 Dec 2020 02:25:51 -0600 Subject: [PATCH] idk, first attempt at adding docs ig. Probably gonna break so yea... --- discord/__init__.py | 6 +++--- discord/colour.py | 17 +++-------------- docs/custom_features.rst | 2 +- docs/ext/menus/index.rst | 31 +++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 docs/ext/menus/index.rst diff --git a/discord/__init__.py b/discord/__init__.py index b086cbcd..c666cca4 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -15,7 +15,7 @@ __title__ = 'discord' __author__ = 'Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-2020 Rapptz' -__version__ = '1.6.0.6a' +__version__ = '1.6.0.6' __path__ = __import__('pkgutil').extend_path(__path__, __name__) @@ -60,9 +60,9 @@ from .raw_models import * from .team import * 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: from logging import NullHandler diff --git a/discord/colour.py b/discord/colour.py index f17debdf..3fdfea97 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -121,7 +121,9 @@ class Colour: @classmethod 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)) @classmethod @@ -129,19 +131,6 @@ class Colour: """A factory method that returns a :class:`Colour` with a value of ``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 def teal(cls): """A factory method that returns a :class:`Colour` with a value of ``0x1abc9c``.""" diff --git a/docs/custom_features.rst b/docs/custom_features.rst index b01d2c62..484146b1 100644 --- a/docs/custom_features.rst +++ b/docs/custom_features.rst @@ -8,7 +8,7 @@ enhanced-dpy was made to add some extra features that make it just a bit easier. 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 - Added ``Guild.bots`` / ``Guild.humans`` diff --git a/docs/ext/menus/index.rst b/docs/ext/menus/index.rst new file mode 100644 index 00000000..f7d07a3a --- /dev/null +++ b/docs/ext/menus/index.rst @@ -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