Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
# Conflicts:
#	setup.cfg
  • Loading branch information
Sigmanificient committed Sep 17, 2021
2 parents b086c33 + 1bc510a commit 22363bc
Show file tree
Hide file tree
Showing 49 changed files with 1,202 additions and 100 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
pygments_style = 'monokai'
default_dark_mode = False
# 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,
Expand Down
152 changes: 152 additions & 0 deletions docs/pincer.middleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,62 @@ pincer.middleware package
Submodules
----------

pincer.middleware.activity\_join module
---------------------------------------

.. automodule:: pincer.middleware.activity_join
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.activity\_join\_request module
------------------------------------------------

.. automodule:: pincer.middleware.activity_join_request
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.activity\_spectate module
-------------------------------------------

.. automodule:: pincer.middleware.activity_spectate
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.channel\_create module
----------------------------------------

.. automodule:: pincer.middleware.channel_create
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.error module
------------------------------

.. automodule:: pincer.middleware.error
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.guild\_create module
--------------------------------------

.. automodule:: pincer.middleware.guild_create
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.guild\_status module
--------------------------------------

.. automodule:: pincer.middleware.guild_status
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.interaction\_create module
--------------------------------------------

Expand All @@ -12,6 +68,38 @@ pincer.middleware.interaction\_create module
:undoc-members:
:show-inheritance:

pincer.middleware.message\_create module
----------------------------------------

.. automodule:: pincer.middleware.message_create
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.message\_delete module
----------------------------------------

.. automodule:: pincer.middleware.message_delete
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.message\_update module
----------------------------------------

.. automodule:: pincer.middleware.message_update
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.notification\_create module
---------------------------------------------

.. automodule:: pincer.middleware.notification_create
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.ready module
------------------------------

Expand All @@ -20,6 +108,70 @@ pincer.middleware.ready module
:undoc-members:
:show-inheritance:

pincer.middleware.speaking\_start module
----------------------------------------

.. automodule:: pincer.middleware.speaking_start
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.speaking\_stop module
---------------------------------------

.. automodule:: pincer.middleware.speaking_stop
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_channel\_select module
-----------------------------------------------

.. automodule:: pincer.middleware.voice_channel_select
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_connection\_status module
--------------------------------------------------

.. automodule:: pincer.middleware.voice_connection_status
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_settings\_update module
------------------------------------------------

.. automodule:: pincer.middleware.voice_settings_update
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_state\_create module
---------------------------------------------

.. automodule:: pincer.middleware.voice_state_create
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_state\_delete module
---------------------------------------------

.. automodule:: pincer.middleware.voice_state_delete
:members:
:undoc-members:
:show-inheritance:

pincer.middleware.voice\_state\_update module
---------------------------------------------

.. automodule:: pincer.middleware.voice_state_update
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
117 changes: 117 additions & 0 deletions docs/pincer.objects.events.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
pincer.objects.events package
=============================

Submodules
----------

pincer.objects.events.channel module
------------------------------------

.. automodule:: pincer.objects.events.channel
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.error module
----------------------------------

.. automodule:: pincer.objects.events.error
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.gateway\_commands module
----------------------------------------------

.. automodule:: pincer.objects.events.gateway_commands
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.guild module
----------------------------------

.. automodule:: pincer.objects.events.guild
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.hello\_ready module
-----------------------------------------

.. automodule:: pincer.objects.events.hello_ready
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.integration module
----------------------------------------

.. automodule:: pincer.objects.events.integration
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.invite module
-----------------------------------

.. automodule:: pincer.objects.events.invite
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.message module
------------------------------------

.. automodule:: pincer.objects.events.message
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.presence module
-------------------------------------

.. automodule:: pincer.objects.events.presence
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.thread module
-----------------------------------

.. automodule:: pincer.objects.events.thread
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.typing\_start module
------------------------------------------

.. automodule:: pincer.objects.events.typing_start
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.voice module
----------------------------------

.. automodule:: pincer.objects.events.voice
:members:
:undoc-members:
:show-inheritance:

pincer.objects.events.webhook module
------------------------------------

.. automodule:: pincer.objects.events.webhook
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pincer.objects.events
:members:
:undoc-members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/pincer.objects.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
pincer.objects package
======================

Subpackages
-----------

.. toctree::
:maxdepth: 4

pincer.objects.events

Submodules
----------

Expand Down
65 changes: 65 additions & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,68 @@ Inheriting from :class:`~.client.Client` allows more flexibility and enables adv
bot.run()
Implementing Slash Commands
---------------------------

Using slash commands is as easy as adding the :func:`~.pincer.commands.command` decorator on a function and using Python annotations to specify the argument types.

.. code-block:: python
from pincer import Client, command
class Bot(Client):
...
@command(description="Add two numbers!")
async def add(self, first: int, second: int):
return f"The addition of `{first}` and `{second}` is `{first + second}`"
Sending private messages
------------------------

See :class:`~.pincer.objects.message.Message` for more.

.. code-block:: python
from pincer import Client, command, Message
class Bot(Client):
...
@command(description="Sends a DM to the user.")
async def private_say(self, message: str):
return Message(message, flags=InteractionFlags.EPHEMERAL)
Sending Embeds
--------------

See :class:`pincer.objects.embed.Embed` for more

.. code-block:: python
from pincer import Client, command, Embed
class Bot(Client):
...
@command(description="Pincer Informational Embed")
async def an_embed(self, message: str):
return Embed(
title="Pincer",
description=(
"🚀 An asynchronous python API wrapper meant to replace"
" discord.py\n> Snappy discord api wrapper written "
"with aiohttp & websockets"
)
).add_field(
name="**Github Repository**",
value="> https://github.com/Pincer-org/Pincer"
).set_thumbnail(
url="https://pincer.dev/img/icon.png"
).set_image(
url=(
"https://repository-images.githubusercontent.com"
"/400871418/045ebf39-7c6e-4c3a-b744-0c3122374203"
)
)
5 changes: 3 additions & 2 deletions pincer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
__package__ = "pincer"
__author__ = "Sigmanificient, Arthurdw"
__license__ = "MIT"
__version__ = "0.6.7-dev"
__version__ = "0.7.0-dev"
__description__ = "Discord API wrapper rebuild from scratch."

from pincer.client import Client, Bot
from pincer.commands import command
from pincer.objects import Intents

__all__ = ("Client", "Bot", "command")
__all__ = ("Client", "Bot", "command", "Intents")
Loading

0 comments on commit 22363bc

Please sign in to comment.