Skip to content

Commit d466a57

Browse files
committed
docs: remove question marks in docstrings
1 parent 77374da commit d466a57

File tree

23 files changed

+660
-660
lines changed

23 files changed

+660
-660
lines changed

interactions/api/dispatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def register(self, coro: Callable[..., Coroutine], name: Optional[str] = None) -
5757
5858
:param coro: The coroutine to register as an event.
5959
:type coro: Callable[..., Coroutine]
60-
:param name?: The name to associate the coroutine with. Defaults to None.
60+
:param name: The name to associate the coroutine with. Defaults to None.
6161
:type name: Optional[str]
6262
"""
6363
_name: str = coro.__name__ if name is None else name

interactions/api/gateway/client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ def __init__(
101101
:type token: str
102102
:param intents: The Gateway intents of the application for event dispatch.
103103
:type intents: Intents
104-
:param session_id?: The ID of the session if trying to reconnect. Defaults to ``None``.
104+
:param session_id: The ID of the session if trying to reconnect. Defaults to ``None``.
105105
:type session_id: Optional[str]
106-
:param sequence?: The identifier sequence if trying to reconnect. Defaults to ``None``.
106+
:param sequence: The identifier sequence if trying to reconnect. Defaults to ``None``.
107107
:type sequence: Optional[int]
108108
"""
109109
try:
@@ -167,7 +167,7 @@ async def _establish_connection(
167167
"""
168168
Establishes a client connection with the Gateway.
169169
170-
:param shard?: The shards to establish a connection with. Defaults to ``None``.
170+
:param shard: The shards to establish a connection with. Defaults to ``None``.
171171
:type shard: Optional[List[Tuple[int]]]
172172
:param presence: The presence to carry with. Defaults to ``None``.
173173
:type presence: Optional[ClientPresence]
@@ -209,7 +209,7 @@ async def _handle_connection(
209209
210210
:param stream: The packet stream to handle.
211211
:type stream: Dict[str, Any]
212-
:param shard?: The shards to establish a connection with. Defaults to ``None``.
212+
:param shard: The shards to establish a connection with. Defaults to ``None``.
213213
:type shard: Optional[List[Tuple[int]]]
214214
:param presence: The presence to carry with. Defaults to ``None``.
215215
:type presence: Optional[ClientPresence]
@@ -660,9 +660,9 @@ async def __identify(
660660
"""
661661
Sends an ``IDENTIFY`` packet to the gateway.
662662
663-
:param shard?: The shard ID to identify under.
663+
:param shard: The shard ID to identify under.
664664
:type shard: Optional[List[Tuple[int]]]
665-
:param presence?: The presence to change the bot to on identify.
665+
:param presence: The presence to change the bot to on identify.
666666
:type presence: Optional[ClientPresence]
667667
"""
668668
self.__shard = shard

interactions/api/http/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def request(self, route: Route, **kwargs) -> Optional[Any]:
9292
9393
:param route: The HTTP route to request.
9494
:type route: Route
95-
:param \**kwargs?: Optional keyword-only arguments to pass as information in the request.
95+
:param \**kwargs: Optional keyword-only arguments to pass as information in the request.
9696
:type \**kwargs: dict
9797
:return: The contents of the request if any.
9898
:rtype: Optional[Any]

interactions/api/http/route.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self, method: str, path: str, **kwargs) -> None:
2727
:type method: str
2828
:param path: The path of the HTTP/URL.
2929
:type path: str
30-
:param \**kwargs?: Optional keyword-only arguments to pass as information in the route.
30+
:param \**kwargs: Optional keyword-only arguments to pass as information in the route.
3131
:type \**kwargs: dict
3232
"""
3333
self.method = method

interactions/api/models/channel.py

Lines changed: 73 additions & 73 deletions
Large diffs are not rendered by default.

interactions/api/models/guild.py

Lines changed: 176 additions & 176 deletions
Large diffs are not rendered by default.

interactions/api/models/gw.py

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ class GuildMember(ClientSerializerMixin):
237237
A class object representing the gateway events ``GUILD_MEMBER_ADD``, ``GUILD_MEMBER_UPDATE`` and ``GUILD_MEMBER_REMOVE``.
238238
239239
:ivar Snowflake guild_id: The guild ID of the event.
240-
:ivar Optional[List[Role]] roles?: The roles of the event.
241-
:ivar Optional[User] user?: The user of the event.
242-
:ivar Optional[str] nick?: The nickname of the user of the event.
243-
:ivar Optional[str] avatar?: The avatar URL of the user of the event.
244-
:ivar Optional[datetime] joined_at?: The time that the user of the event joined at.
245-
:ivar Optional[datetime] premium_since?: The time that the user of the event has since had "premium."
246-
:ivar Optional[bool] deaf?: Whether the member of the event is deafened or not.
247-
:ivar Optional[bool] mute?: Whether the member of the event is muted or not.
248-
:ivar Optional[bool] pending?: Whether the member of the event is still pending -- pass membership screening -- or not.
240+
:ivar Optional[List[Role]] roles: The roles of the event.
241+
:ivar Optional[User] user: The user of the event.
242+
:ivar Optional[str] nick: The nickname of the user of the event.
243+
:ivar Optional[str] avatar: The avatar URL of the user of the event.
244+
:ivar Optional[datetime] joined_at: The time that the user of the event joined at.
245+
:ivar Optional[datetime] premium_since: The time that the user of the event has since had "premium."
246+
:ivar Optional[bool] deaf: Whether the member of the event is deafened or not.
247+
:ivar Optional[bool] mute: Whether the member of the event is muted or not.
248+
:ivar Optional[bool] pending: Whether the member of the event is still pending -- pass membership screening -- or not.
249249
"""
250250

251251
guild_id: Snowflake = field(converter=Snowflake)
@@ -304,9 +304,9 @@ async def ban(
304304
"""
305305
Bans the member from a guild.
306306
307-
:param reason?: The reason of the ban
307+
:param reason: The reason of the ban
308308
:type reason: Optional[str]
309-
:param delete_message_days?: Number of days to delete messages, from 0 to 7. Defaults to 0
309+
:param delete_message_days: Number of days to delete messages, from 0 to 7. Defaults to 0
310310
:type delete_message_days: Optional[int]
311311
"""
312312
await self._client.create_guild_ban(
@@ -323,7 +323,7 @@ async def kick(
323323
"""
324324
Kicks the member from a guild.
325325
326-
:param reason?: The reason for the kick
326+
:param reason: The reason for the kick
327327
:type reason: Optional[str]
328328
"""
329329
if not self._client:
@@ -344,7 +344,7 @@ async def add_role(
344344
345345
:param role: The role to add. Either ``Role`` object or role_id
346346
:type role: Union[Role, int]
347-
:param reason?: The reason why the roles are added
347+
:param reason: The reason why the roles are added
348348
:type reason: Optional[str]
349349
"""
350350
if not self._client:
@@ -374,7 +374,7 @@ async def remove_role(
374374
375375
:param role: The role to remove. Either ``Role`` object or role_id
376376
:type role: Union[Role, int]
377-
:param reason?: The reason why the roles are removed
377+
:param reason: The reason why the roles are removed
378378
:type reason: Optional[str]
379379
"""
380380
if not self._client:
@@ -416,17 +416,17 @@ async def send(
416416
"""
417417
Sends a DM to the member.
418418
419-
:param content?: The contents of the message as a string or string-converted value.
419+
:param content: The contents of the message as a string or string-converted value.
420420
:type content: Optional[str]
421-
:param components?: A component, or list of components for the message.
421+
:param components: A component, or list of components for the message.
422422
:type components: Optional[Union[ActionRow, Button, SelectMenu, List[Actionrow], List[Button], List[SelectMenu]]]
423-
:param tts?: Whether the message utilizes the text-to-speech Discord programme or not.
423+
:param tts: Whether the message utilizes the text-to-speech Discord programme or not.
424424
:type tts: Optional[bool]
425-
:param files?: A file or list of files to be attached to the message.
425+
:param files: A file or list of files to be attached to the message.
426426
:type files: Optional[Union[File, List[File]]]
427-
:param embeds?: An embed, or list of embeds for the message.
427+
:param embeds: An embed, or list of embeds for the message.
428428
:type embeds: Optional[Union[Embed, List[Embed]]]
429-
:param allowed_mentions?: The message interactions/mention limits that the message can refer to.
429+
:param allowed_mentions: The message interactions/mention limits that the message can refer to.
430430
:type allowed_mentions: Optional[MessageInteraction]
431431
:return: The sent message as an object.
432432
:rtype: Message
@@ -488,19 +488,19 @@ async def modify(
488488
"""
489489
Modifies the member of a guild.
490490
491-
:param nick?: The nickname of the member
491+
:param nick: The nickname of the member
492492
:type nick: Optional[str]
493-
:param roles?: A list of all role ids the member has
493+
:param roles: A list of all role ids the member has
494494
:type roles: Optional[List[int]]
495-
:param mute?: whether the user is muted in voice channels
495+
:param mute: whether the user is muted in voice channels
496496
:type mute: Optional[bool]
497-
:param deaf?: whether the user is deafened in voice channels
497+
:param deaf: whether the user is deafened in voice channels
498498
:type deaf: Optional[bool]
499-
:param channel_id?: id of channel to move user to (if they are connected to voice)
499+
:param channel_id: id of channel to move user to (if they are connected to voice)
500500
:type channel_id: Optional[int]
501-
:param communication_disabled_until?: when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future)
501+
:param communication_disabled_until: when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future)
502502
:type communication_disabled_until: Optional[datetime.isoformat]
503-
:param reason?: The reason of the modifying
503+
:param reason: The reason of the modifying
504504
:type reason: Optional[str]
505505
:return: The modified member object
506506
:rtype: Member
@@ -585,7 +585,7 @@ class GuildRole(ClientSerializerMixin):
585585
586586
:ivar Snowflake guild_id: The guild ID of the event.
587587
:ivar Optional[Role] role: The role of the event.
588-
:ivar Optional[Snowflake] role_id?: The role ID of the event.
588+
:ivar Optional[Snowflake] role_id: The role ID of the event.
589589
"""
590590

591591
guild_id: Snowflake = field(converter=Snowflake)
@@ -618,18 +618,18 @@ class GuildScheduledEvent(ClientSerializerMixin, IDMixin):
618618
619619
:ivar Snowflake id: The ID of the scheduled event.
620620
:ivar Snowflake guild_id: The ID of the guild that this scheduled event belongs to.
621-
:ivar Optional[Snowflake] channel_id?: The channel ID in which the scheduled event belongs to, if any.
622-
:ivar Optional[Snowflake] creator_id?: The ID of the user that created the scheduled event.
621+
:ivar Optional[Snowflake] channel_id: The channel ID in which the scheduled event belongs to, if any.
622+
:ivar Optional[Snowflake] creator_id: The ID of the user that created the scheduled event.
623623
:ivar str name: The name of the scheduled event.
624624
:ivar str description: The description of the scheduled event.
625-
:ivar datetime scheduled_start_time?: The scheduled event start time.
626-
:ivar Optional[datetime] scheduled_end_time?: The scheduled event end time, if any.
625+
:ivar datetime scheduled_start_time: The scheduled event start time.
626+
:ivar Optional[datetime] scheduled_end_time: The scheduled event end time, if any.
627627
:ivar int privacy_level: The privacy level of the scheduled event.
628628
:ivar int entity_type: The type of the scheduled event.
629-
:ivar Optional[Snowflake] entity_id?: The ID of the entity associated with the scheduled event.
630-
:ivar Optional[EventMetadata] entity_metadata?: Additional metadata associated with the scheduled event.
631-
:ivar Optional[User] creator?: The user that created the scheduled event.
632-
:ivar Optional[int] user_count?: The number of users subscribed to the scheduled event.
629+
:ivar Optional[Snowflake] entity_id: The ID of the entity associated with the scheduled event.
630+
:ivar Optional[EventMetadata] entity_metadata: Additional metadata associated with the scheduled event.
631+
:ivar Optional[User] creator: The user that created the scheduled event.
632+
:ivar Optional[int] user_count: The number of users subscribed to the scheduled event.
633633
:ivar int status: The status of the scheduled event
634634
:ivar Optional[str] image: The hash containing the image of an event, if applicable.
635635
"""
@@ -760,12 +760,12 @@ class MessageReaction(DictSerializerMixin):
760760
"""
761761
A class object representing the gateway event ``MESSAGE_REACTION_ADD``.
762762
763-
:ivar Optional[Snowflake] user_id?: The user ID of the event.
763+
:ivar Optional[Snowflake] user_id: The user ID of the event.
764764
:ivar Snowflake channel_id: The channel ID of the event.
765765
:ivar Snowflake message_id: The message ID of the event.
766-
:ivar Optional[Snowflake] guild_id?: The guild ID of the event.
767-
:ivar Optional[Member] member?: The member of the event.
768-
:ivar Optional[Emoji] emoji?: The emoji of the event.
766+
:ivar Optional[Snowflake] guild_id: The guild ID of the event.
767+
:ivar Optional[Member] member: The member of the event.
768+
:ivar Optional[Emoji] emoji: The emoji of the event.
769769
"""
770770

771771
user_id: Optional[Snowflake] = field(converter=Snowflake, default=None)
@@ -784,11 +784,11 @@ class ReactionRemove(MessageReaction):
784784
This class inherits the already existing attributes of :class:`interactions.api.models.gw.Reaction`.
785785
The main missing attribute is ``member``.
786786
787-
:ivar Optional[Snowflake] user_id?: The user ID of the event.
787+
:ivar Optional[Snowflake] user_id: The user ID of the event.
788788
:ivar Snowflake channel_id: The channel ID of the event.
789789
:ivar Snowflake message_id: The message ID of the event.
790-
:ivar Optional[Snowflake] guild_id?: The guild ID of the event.
791-
:ivar Optional[Emoji] emoji?: The emoji of the event.
790+
:ivar Optional[Snowflake] guild_id: The guild ID of the event.
791+
:ivar Optional[Emoji] emoji: The emoji of the event.
792792
"""
793793

794794
# todo see if the missing member attribute affects anything
@@ -800,7 +800,7 @@ class ThreadList(DictSerializerMixin):
800800
A class object representing the gateway event ``THREAD_LIST_SYNC``.
801801
802802
:ivar Snowflake guild_id: The guild ID of the event.
803-
:ivar Optional[List[Snowflake]] channel_ids?: The channel IDs of the event.
803+
:ivar Optional[List[Snowflake]] channel_ids: The channel IDs of the event.
804804
:ivar List[Channel] threads: The threads of the event.
805805
:ivar List[ThreadMember] members: The members of the thread of the event.
806806
"""
@@ -819,8 +819,8 @@ class ThreadMembers(DictSerializerMixin, IDMixin):
819819
:ivar Snowflake id: The ID of the event.
820820
:ivar Snowflake guild_id: The guild ID of the event.
821821
:ivar int member_count: The member count of the event.
822-
:ivar Optional[List[ThreadMember]] added_members?: The added members of the thread of the event.
823-
:ivar Optional[List[Snowflake]] removed_member_ids?: The removed IDs of members of the thread of the event.
822+
:ivar Optional[List[ThreadMember]] added_members: The added members of the thread of the event.
823+
:ivar Optional[List[Snowflake]] removed_member_ids: The removed IDs of members of the thread of the event.
824824
"""
825825

826826
id: Snowflake = field(converter=Snowflake)

0 commit comments

Comments
 (0)