first commit

This commit is contained in:
Avanpost 2024-11-05 14:57:38 +00:00
commit 988afb33e3
Signed by: avanpost20
GPG key ID: C879DD866453B55E
73 changed files with 8407 additions and 0 deletions

20
docs/Makefile Normal file
View file

@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

289
docs/api.rst Normal file
View file

@ -0,0 +1,289 @@
.. currentmodule:: next
API Reference
===============
.. autoclass:: Client
:members:
:inherited-members:
.. autoclass:: Asset
:members:
:inherited-members:
.. autoclass:: PartialAsset
:members:
:inherited-members:
.. autoclass:: Channel
:members:
:inherited-members:
.. autoclass:: ServerChannel
:members:
:inherited-members:
.. autoclass:: SavedMessageChannel
:members:
:inherited-members:
.. autoclass:: DMChannel
:members:
:inherited-members:
.. autoclass:: GroupDMChannel
:members:
:inherited-members:
.. autoclass:: TextChannel
:members:
:inherited-members:
.. autoclass:: VoiceChannel
:members:
:inherited-members:
.. autoclass:: Embed
:members:
:inherited-members:
.. autoclass:: WebsiteEmbed
:members:
:inherited-members:
.. autoclass:: ImageEmbed
:members:
:inherited-members:
.. autoclass:: TextEmbed
:members:
:inherited-members:
.. autoclass:: NoneEmbed
:members:
:inherited-members:
.. autoclass:: SendableEmbed
:members:
:inherited-members:
.. autoclass:: File
:members:
:inherited-members:
.. autoclass:: Member
:members:
:inherited-members:
.. autoclass:: Message
:members:
:inherited-members:
.. autoclass:: MessageReply
:members:
:inherited-members:
.. autoclass:: Masquerade
:members:
:inherited-members:
.. autoclass:: Messageable
:members:
:inherited-members:
.. autoclass:: Permissions
:members:
:inherited-members:
.. autoclass:: UserPermissions
:members:
:inherited-members:
.. autoclass:: PermissionsOverwrite
:members:
:inherited-members:
.. autoclass:: Role
:members:
:inherited-members:
.. autoclass:: Server
:members:
:inherited-members:
.. autoclass:: ServerBan
:members:
:inherited-members:
.. autoclass:: Category
:members:
:inherited-members:
.. autoclass:: SystemMessages
:members:
:inherited-members:
.. autoclass:: User
:members:
:inherited-members:
.. autonamedtuple:: Relation
.. autonamedtuple:: Status
.. autoclass:: UserBadges
:members:
.. autoclass:: UserProfile
:members:
.. autoclass:: Invite
:members:
.. autoclass:: Emoji
:members:
.. autoclass:: MessageInteractions
:members:
Enums
======
The api uses enums to say what variant of something is,
these represent those enums
All enums subclass `aenum.Enum`.
.. class:: ChannelType
Specifies the type of channel.
.. attribute:: saved_message
A private channel only you can access.
.. attribute:: direct_message
A private direct message channel between you and another user
.. attribute:: group
A private group channel for messages between a group of users
.. attribute:: text_channel
A text channel in a server
.. attribute:: voice_channel
A voice only channel
.. class:: PresenceType
Specifies what a users presence is
.. attribute:: busy
The user is busy and wont receive notification
.. attribute:: idle
The user is idle
.. attribute:: invisible
The user is invisible, you will never receive this, instead they will appear offline
.. attribute:: online
The user is online
.. attribute:: offline
The user is offline or invisible
.. class:: RelationshipType
Specifies the relationship between two users
.. attribute:: blocked
You have blocked them
.. attribute:: blocked_other
They have blocked you
.. attribute:: friend
You are friends with them
.. attribute:: incoming_friend_request
They are sending you a friend request
.. attribute:: none
You have no relationship with them
.. attribute:: outgoing_friend_request
You are sending them a friend request
.. attribute:: user
That user is yourself
.. class:: AssetType
Specifies the type of asset
.. attribute:: image
The asset is an image
.. attribute:: video
The asset is a video
.. attribute:: text
The asset is a text file
.. attribute:: audio
The asset is an audio file
.. attribute:: file
The asset is a generic file
.. class:: SortType
The sort type for a message search
.. attribute:: latest
Sort by the latest message
.. attribute:: oldest
Sort by the oldest message
.. attribute:: relevance
Sort by the relevance of the message
.. class:: EmbedType
The type of embed
.. attribute:: website
The embed is a website
.. attribute:: image
The embed is an image
.. attribute:: text
The embed is text
.. attribute:: video
The embed is a video
.. attribute:: unknown
The embed is unknown
Utils
======
.. currentmodule:: next.utils
A collection a utility functions and classes to aid in making your bot
.. autofunction:: get
.. autofunction:: client_session

65
docs/conf.py Normal file
View file

@ -0,0 +1,65 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys
import sphinx_nameko_theme
sys.path.insert(0, os.path.abspath('..'))
import next
# -- Project information -----------------------------------------------------
project = 'Next.py'
copyright = '2024-present, Avanpost'
author = 'Avanpost'
version = ".".join(map(str, next.__version__))
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx_toolbox.installation",
"sphinx_toolbox.more_autodoc.autonamedtuple"
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
add_module_names = False
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'nameko'
html_theme_path = [sphinx_nameko_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
autodoc_typehints = "none"

110
docs/ext/commands/api.rst Normal file
View file

@ -0,0 +1,110 @@
.. currentmodule:: next
API Reference
===============
CommandsClient
~~~~~~~~~~~~~~~
.. autoclass:: next.ext.commands.CommandsClient
:members:
Context
~~~~~~~~
.. autoclass:: next.ext.commands.Context
:members:
Command
~~~~~~~~
.. autoclass:: next.ext.commands.Command
:members:
Cog
~~~~
.. autoclass:: next.ext.commands.Cog
:members:
command
~~~~~~~~
.. autodecorator:: next.ext.commands.command
check
~~~~~~
.. autodecorator:: next.ext.commands.check
is_bot_owner
~~~~~~~~~~~~~
.. autodecorator:: next.ext.commands.is_bot_owner
is_server_owner
~~~~~~~~~~~~~~~~
.. autodecorator:: next.ext.commands.is_server_owner
Exceptions
===========
CommandError
~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.CommandError
:members:
CommandNotFound
~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.CommandNotFound
:members:
NoClosingQuote
~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.NoClosingQuote
:members:
CheckError
~~~~~~~~~~~
.. autoexception:: next.ext.commands.CheckError
:members:
NotBotOwner
~~~~~~~~~~~~
.. autoexception:: next.ext.commands.NotBotOwner
:members:
NotServerOwner
~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.NotServerOwner
:members:
ServerOnly
~~~~~~~~~~~
.. autoexception:: next.ext.commands.ServerOnly
:members:
ConverterError
~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.ConverterError
:members:
InvalidLiteralArgument
~~~~~~~~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.InvalidLiteralArgument
:members:
BadBoolArgument
~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.BadBoolArgument
:members:
CategoryConverterError
~~~~~~~~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.CategoryConverterError
:members:
UserConverterError
~~~~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.UserConverterError
:members:
MemberConverterError
~~~~~~~~~~~~~~~~~~~~~
.. autoexception:: next.ext.commands.MemberConverterError
:members:

View file

@ -0,0 +1,9 @@
.. next_ext_commands:
``next.ext.commands`` - Command Framework
============================================
.. toctree::
:maxdepth: 1
api

14
docs/index.rst Normal file
View file

@ -0,0 +1,14 @@
Welcome to Next.py's documentation!
======================================
.. toctree::
:maxdepth: 1
api
Extensions
-----------
.. toctree::
:maxdepth: 1
ext/commands/index.rst

35
docs/make.bat Normal file
View file

@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd