hikari.impl.special_endpoints#
Special endpoint implementations.
You should never need to make any of these objects manually.
Module Contents#
- class hikari.impl.special_endpoints.AutocompleteChoiceBuilder[source]#
Bases:
hikari.api.special_endpoints.AutocompleteChoiceBuilder
Standard implementation of
special_endpoints.AutocompleteChoiceBuilder
.
- class hikari.impl.special_endpoints.ChannelSelectMenuBuilder[source]#
Bases:
SelectMenuBuilder
,hikari.api.special_endpoints.ChannelSelectMenuBuilder
Builder class for channel select menus.
- class hikari.impl.special_endpoints.CommandBuilder[source]#
Bases:
hikari.api.special_endpoints.CommandBuilder
Standard implementation of
hikari.api.special_endpoints.CommandBuilder
.
- class hikari.impl.special_endpoints.ContextMenuCommandBuilder[source]#
Bases:
CommandBuilder
,hikari.api.special_endpoints.ContextMenuCommandBuilder
Builder class for context menu commands.
- class hikari.impl.special_endpoints.GuildBuilder[source]#
Bases:
hikari.api.special_endpoints.GuildBuilder
Result type of
hikari.api.rest.RESTClient.guild_builder
.This is used to create a guild in a tidy way using the HTTP API, since the logic behind creating a guild on an API level is somewhat confusing and detailed.
Note
If you call
add_role
, the default roles provided by Discord will be created. This also applies to theadd_
functions for text channels/voice channels/categories.Note
Functions that return a
hikari.snowflakes.Snowflake
do not provide the final ID that the object will have once the API call is made. The returned IDs are only able to be used to re-reference particular objects while building the guild format to allow for the creation of channels within categories, and to provide permission overwrites.Examples
Creating an empty guild:
guild = await rest.guild_builder("My Server!").create()
Creating a guild with an icon:
from hikari.files import WebResourceStream guild_builder = rest.guild_builder("My Server!") guild_builder.icon = WebResourceStream("cat.png", "http://...") guild = await guild_builder.create()
Adding roles to your guild:
from hikari.permissions import Permissions guild_builder = rest.guild_builder("My Server!") everyone_role_id = guild_builder.add_role("@everyone") admin_role_id = guild_builder.add_role("Admins", permissions=Permissions.ADMINISTRATOR) await guild_builder.create()
Warning
The first role must always be the
@everyone
role.Adding a text channel to your guild:
guild_builder = rest.guild_builder("My Server!") category_id = guild_builder.add_category("My safe place") channel_id = guild_builder.add_text_channel("general", parent_id=category_id) await guild_builder.create()
- class hikari.impl.special_endpoints.InteractionAutocompleteBuilder(choices=(), *, _stack_level=0)[source]#
Bases:
hikari.api.special_endpoints.InteractionAutocompleteBuilder
Standard implementation of
hikari.api.special_endpoints.InteractionAutocompleteBuilder
.- set_choices(choices, /)[source]#
Set autocomplete choices.
- Returns:
InteractionAutocompleteBuilder
Object of this builder.
- class hikari.impl.special_endpoints.InteractionDeferredBuilder[source]#
Bases:
hikari.api.special_endpoints.InteractionDeferredBuilder
Standard implementation of
hikari.api.special_endpoints.InteractionDeferredBuilder
.- Parameters:
- type
hikari.interactions.base_interactions.DeferredResponseTypesT
The type of interaction response this is.
- type
- class hikari.impl.special_endpoints.InteractionMessageBuilder[source]#
Bases:
hikari.api.special_endpoints.InteractionMessageBuilder
Standard implementation of
hikari.api.special_endpoints.InteractionMessageBuilder
.- Parameters:
- type
hikari.interactions.base_interactions.MessageResponseTypesT
The type of interaction response this is.
- type
- Other Parameters:
- content
hikari.undefined.UndefinedOr
[str
] The content of this response, if supplied. This follows the same rules as “content” on create message.
- content
- class hikari.impl.special_endpoints.InteractionModalBuilder[source]#
Bases:
hikari.api.special_endpoints.InteractionModalBuilder
Standard implementation of
hikari.api.special_endpoints.InteractionModalBuilder
.
- class hikari.impl.special_endpoints.InteractiveButtonBuilder[source]#
Bases:
_ButtonBuilder
,hikari.api.special_endpoints.InteractiveButtonBuilder
Builder class for interactive buttons.
- class hikari.impl.special_endpoints.LinkButtonBuilder[source]#
Bases:
_ButtonBuilder
,hikari.api.special_endpoints.LinkButtonBuilder
Builder class for link buttons.
- class hikari.impl.special_endpoints.MessageActionRowBuilder[source]#
Bases:
hikari.api.special_endpoints.MessageActionRowBuilder
Standard implementation of
hikari.api.special_endpoints.ActionRowBuilder
.
- class hikari.impl.special_endpoints.ModalActionRowBuilder[source]#
Bases:
hikari.api.special_endpoints.ModalActionRowBuilder
Standard implementation of
hikari.api.special_endpoints.ActionRowBuilder
.
- class hikari.impl.special_endpoints.SelectMenuBuilder[source]#
Bases:
hikari.api.special_endpoints.SelectMenuBuilder
Builder class for select menus.
- class hikari.impl.special_endpoints.SelectOptionBuilder[source]#
Bases:
hikari.api.special_endpoints.SelectOptionBuilder
Builder class for select menu options.
- class hikari.impl.special_endpoints.SlashCommandBuilder[source]#
Bases:
CommandBuilder
,hikari.api.special_endpoints.SlashCommandBuilder
Builder class for slash commands.
- class hikari.impl.special_endpoints.TextInputBuilder[source]#
Bases:
hikari.api.special_endpoints.TextInputBuilder
Standard implementation of
hikari.api.special_endpoints.TextInputBuilder
.
- class hikari.impl.special_endpoints.TextSelectMenuBuilder(*, custom_id, parent, options = (), placeholder = undefined.UNDEFINED, min_values = 0, max_values = 1, is_disabled = False) TextSelectMenuBuilder(*, custom_id, options = (), placeholder = undefined.UNDEFINED, min_values = 0, max_values = 1, is_disabled = False)[source]#
Bases:
SelectMenuBuilder
,hikari.api.special_endpoints.TextSelectMenuBuilder
[_ParentT
]Builder class for text select menus.
- class hikari.impl.special_endpoints.TypingIndicator(request_call, channel, rest_close_event)[source]#
Bases:
hikari.api.special_endpoints.TypingIndicator
Result type of
hikari.api.rest.RESTClient.trigger_typing
.This is an object that can either be awaited like a coroutine to trigger the typing indicator once, or an async context manager to keep triggering the typing indicator repeatedly until the context finishes.
Note
This is a helper class that is used by
hikari.api.rest.RESTClient
. You should only ever need to use instances of this class that are produced by that API.