mirror of
https://github.com/stoatchat/python-client-sdk.git
synced 2026-07-21 01:55:23 -04:00
fix up docs
This commit is contained in:
+128
-9
@@ -16,6 +16,13 @@ Asset
|
||||
.. autoclass:: Asset
|
||||
:members:
|
||||
|
||||
PartialAsset
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: PartialAsset
|
||||
:members:
|
||||
|
||||
|
||||
Channel
|
||||
~~~~~~~~
|
||||
|
||||
@@ -47,7 +54,7 @@ TextChannel
|
||||
:members:
|
||||
|
||||
VoiceChannel
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: VoiceChannel
|
||||
:members:
|
||||
@@ -59,6 +66,35 @@ Embed
|
||||
.. autoclass:: Embed
|
||||
:members:
|
||||
|
||||
WebsiteEmbed
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: WebsiteEmbed
|
||||
:members:
|
||||
|
||||
ImageEmbed
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: ImageEmbed
|
||||
:members:
|
||||
|
||||
TextEmbed
|
||||
~~~~~~~~~~
|
||||
|
||||
.. autoclass:: TextEmbed
|
||||
:members:
|
||||
|
||||
NoneEmbed
|
||||
~~~~~~~~~~
|
||||
|
||||
.. autoclass:: NoneEmbed
|
||||
:members:
|
||||
|
||||
SendableEmbed
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: SendableEmbed
|
||||
:members:
|
||||
|
||||
File
|
||||
~~~~~
|
||||
@@ -73,26 +109,35 @@ Member
|
||||
:members:
|
||||
|
||||
Message
|
||||
~~~~~~~
|
||||
~~~~~~~~
|
||||
|
||||
.. autoclass:: Message
|
||||
:members:
|
||||
|
||||
MessageReply
|
||||
~~~~~~~~~~~~~
|
||||
.. autoclass:: MessageReply
|
||||
:members:
|
||||
|
||||
Masquerade
|
||||
~~~~~~~~~~~~~
|
||||
.. autoclass:: Masquerade
|
||||
:members:
|
||||
|
||||
Messageable
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: Messageable
|
||||
:members:
|
||||
|
||||
Permissions
|
||||
~~~~~~~~~~~~
|
||||
ChannelPermissions
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: ChannelPermissions
|
||||
:members:
|
||||
|
||||
ServerPermissions
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
.. autoclass:: ServerPermissions
|
||||
:members:
|
||||
|
||||
@@ -108,6 +153,12 @@ Server
|
||||
.. autoclass:: Server
|
||||
:members:
|
||||
|
||||
ServerBan
|
||||
~~~~~~~~~~
|
||||
|
||||
.. autoclass:: ServerBan
|
||||
:members:
|
||||
|
||||
Category
|
||||
~~~~~~~~~
|
||||
|
||||
@@ -145,11 +196,23 @@ UserBadges
|
||||
.. autoclass:: UserBadges
|
||||
:members:
|
||||
|
||||
UserProfile
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. autoclass:: UserProfile
|
||||
:members:
|
||||
|
||||
Invite
|
||||
~~~~~~~
|
||||
|
||||
.. autoclass:: Invite
|
||||
:members:
|
||||
|
||||
Enums
|
||||
======
|
||||
|
||||
The api uses enums to say what variant of something is, these represent those enums
|
||||
The api uses enums to say what variant of something is,
|
||||
these represent those enums
|
||||
|
||||
All enums subclass `aenum.Enum`.
|
||||
|
||||
@@ -161,10 +224,10 @@ All enums subclass `aenum.Enum`.
|
||||
|
||||
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
|
||||
|
||||
@@ -211,16 +274,70 @@ All enums subclass `aenum.Enum`.
|
||||
|
||||
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
|
||||
======
|
||||
|
||||
@@ -229,3 +346,5 @@ Utils
|
||||
A collection a utility functions and classes to aid in making your bot
|
||||
|
||||
.. autofunction:: get
|
||||
|
||||
.. autodecorator:: client_session
|
||||
|
||||
@@ -8,6 +8,7 @@ from .enums import *
|
||||
from .errors import *
|
||||
from .file import *
|
||||
from .flags import *
|
||||
from .invite import *
|
||||
from .member import *
|
||||
from .message import *
|
||||
from .messageable import *
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
|
||||
from .types import File as FilePayload
|
||||
|
||||
|
||||
__all__ = ("Asset",)
|
||||
__all__ = ("Asset", "PartialAsset")
|
||||
|
||||
class Asset:
|
||||
"""Represents a file on revolt
|
||||
|
||||
+1
-1
@@ -126,7 +126,7 @@ class Message:
|
||||
await self.state.http.delete_message(self.channel.id, self.id)
|
||||
|
||||
def reply(self, *args, mention: bool = False, **kwargs):
|
||||
"""Replies to this message, equivilant to `message.channel.send(..., replies=[MessageReply(message, mention)])"""
|
||||
"""Replies to this message, equivilant to `message.channel.send(..., replies=[MessageReply(message, mention)])`"""
|
||||
return self.channel.send(*args, **kwargs, replies=[MessageReply(self, mention)])
|
||||
|
||||
class MessageReply(NamedTuple):
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ if TYPE_CHECKING:
|
||||
from .types import SystemMessagesConfig, Ban
|
||||
|
||||
|
||||
__all__ = ("Server", "SystemMessages")
|
||||
__all__ = ("Server", "SystemMessages", "ServerBan")
|
||||
|
||||
class SystemMessages:
|
||||
def __init__(self, data: SystemMessagesConfig, state: State):
|
||||
|
||||
@@ -5,13 +5,14 @@ from typing import TYPE_CHECKING, Literal, TypedDict, Union
|
||||
from .channel import (Channel, DMChannel, GroupDMChannel, SavedMessages,
|
||||
TextChannel, VoiceChannel)
|
||||
from .message import Message
|
||||
from .user import Status
|
||||
from .file import File
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .member import Member, MemberID
|
||||
from .server import Server
|
||||
from .user import Status, User
|
||||
from .user import User
|
||||
from .role import Permission
|
||||
from .file import File
|
||||
from .category import Category
|
||||
from .server import SystemMessagesConfig
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
||||
from .types import User as UserPayload
|
||||
|
||||
|
||||
__all__ = ("User",)
|
||||
__all__ = ("User", "Status", "Relation", "UserProfile")
|
||||
|
||||
class Relation(NamedTuple):
|
||||
"""A namedtuple representing a relation between the bot and a user"""
|
||||
|
||||
Reference in New Issue
Block a user