Guild Models#

enum interactions.api.models.guild.VerificationLevel(value)[स्रोत]#

An enumerable object representing the verification level of a guild.

Member Type:

int

Valid values are as follows:

NONE = <VerificationLevel.NONE: 0>#
LOW = <VerificationLevel.LOW: 1>#
MEDIUM = <VerificationLevel.MEDIUM: 2>#
HIGH = <VerificationLevel.HIGH: 3>#
VERY_HIGH = <VerificationLevel.VERY_HIGH: 4>#
enum interactions.api.models.guild.EntityType(value)[स्रोत]#

An enumerable object representing the type of event.

Member Type:

int

Valid values are as follows:

STAGE_INSTANCE = <EntityType.STAGE_INSTANCE: 1>#
VOICE = <EntityType.VOICE: 2>#
EXTERNAL = <EntityType.EXTERNAL: 3>#
enum interactions.api.models.guild.DefaultMessageNotificationLevel(value)[स्रोत]#

An enumerable object representing the default message notification level of a guild.

Member Type:

int

Valid values are as follows:

ALL_MESSAGES = <DefaultMessageNotificationLevel.ALL_MESSAGES: 0>#
ONLY_MENTIONS = <DefaultMessageNotificationLevel.ONLY_MENTIONS: 1>#
class interactions.api.models.guild.EventMetadata(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing the metadata of an event entity.

चर पद :

location (Optional[str]) -- The location of the event, if any.

enum interactions.api.models.guild.EventStatus(value)[स्रोत]#

An enumerable object representing the status of an event.

Member Type:

int

Valid values are as follows:

SCHEDULED = <EventStatus.SCHEDULED: 1>#
ACTIVE = <EventStatus.ACTIVE: 2>#
COMPLETED = <EventStatus.COMPLETED: 3>#
CANCELED = <EventStatus.CANCELED: 4>#
class interactions.api.models.guild.GuildTemplate(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

An object representing the snapshot of an existing guild.

चर पद :
  • code (str) -- The code of the guild template.

  • name (str) -- The name of the guild template.

  • description (Optional[str]) -- The description of the guild template, if given.

  • usage_count (int) -- The amount of uses on the template.

  • creator_id (Snowflake) -- User ID of the creator of this template.

  • creator (User) -- The User object of the creator of this template.

  • created_at (datetime) -- The time when this template was created.

  • update_at (datetime) -- The time when this template was updated.

  • source_guild_id (Snowflake) -- The Guild ID that the template sourced from.

  • serialized_source_guild (Guild) -- A partial Guild object from the sourced template.

  • is_dirty (Optional[bool]) -- A status that denotes if the changes are unsynced.

class interactions.api.models.guild.Integration(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing an integration in a guild.

चर पद :
  • id (Snowflake) -- The ID of the integration.

  • name (str) -- The name of the integration.

  • type (str) -- The type of integration.

  • enabled (bool) -- Whether the integration is enabled or not.

  • syncing (bool) -- Whether the integration is syncing or not.

  • role_id (Snowflake) -- The role ID that the integration uses for "subscribed" users.

  • enable_emoticons (bool) -- Whether emoticons should be enabled or not.

  • expire_behavior (int) -- The expiration behavior of the integration.

  • expire_grace_period (int) -- The "grace period" of the integration when expired -- how long it can still be used.

  • user (User) -- The user of the integration.

  • account (Any) -- The account of the integration.

  • synced_at (datetime) -- The time that the integration was last synced.

  • subscriber_count (int) -- The current subscriber count of the integration.

  • revoked (bool) -- Whether the integration was revoked for use or not.

  • application (Application) -- The application used for the integration.

enum interactions.api.models.guild.InviteTargetType(value)[स्रोत]#

An enumerable object representing the different invite target types

Member Type:

int

Valid values are as follows:

STREAM = <InviteTargetType.STREAM: 1>#
EMBEDDED_APPLICATION = <InviteTargetType.EMBEDDED_APPLICATION: 2>#
class interactions.api.models.guild.StageInstance(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing an instance of a stage channel in a guild.

चर पद :
  • id (Snowflake) -- The ID of the stage.

  • guild_id (Snowflake) -- The guild ID the stage is in.

  • channel_id (Snowflake) -- The channel ID the stage is instantiated from.

  • topic (str) -- The topic of the stage.

  • privacy_level (int) -- The "privacy"/inclusive accessibility level of the stage.

  • discoverable_disabled (bool) -- Whether the stage can be seen from the stage discovery.

class interactions.api.models.guild.UnavailableGuild(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing how a guild that is unavailable.

टिप्पणी

This object only seems to show up during the connection process of the client to the Gateway when the READY event is dispatched. This event will pass fields with guilds where this becomes present.

चर पद :
  • id (Snowflake) -- The ID of the unavailable guild.

  • unavailable (bool) -- Whether the guild is unavailable or not.

class interactions.api.models.guild.WelcomeChannels(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing a welcome channel on the welcome screen.

टिप्पणी

emoji_id and emoji_name are given values respectively if the welcome channel uses an emoji.

चर पद :
  • channel_id (Snowflake) -- The ID of the welcome channel.

  • description (str) -- The description of the welcome channel.

  • emoji_id (Optional[Snowflake]) -- The ID of the emoji of the welcome channel.

  • emoji_name (Optional[str]) -- The name of the emoji of the welcome channel.

enum interactions.api.models.guild.ExplicitContentFilterLevel(value)[स्रोत]#

An enumerable object representing the explicit content filter level of a guild.

Member Type:

int

Valid values are as follows:

DISABLED = <ExplicitContentFilterLevel.DISABLED: 0>#
MEMBERS_WITHOUT_ROLES = <ExplicitContentFilterLevel.MEMBERS_WITHOUT_ROLES: 1>#
ALL_MEMBERS = <ExplicitContentFilterLevel.ALL_MEMBERS: 2>#
class interactions.api.models.guild.ScheduledEvents(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing the scheduled events of a guild.

चर पद :
  • id (Snowflake) -- The ID of the scheduled event.

  • guild_id (Snowflake) -- The ID of the guild that this scheduled event belongs to.

  • channel_id (Optional[Snowflake]) -- The channel ID in which the scheduled event belongs to, if any.

  • creator_id (Optional[Snowflake]) -- The ID of the user that created the scheduled event.

  • name (str) -- The name of the scheduled event.

  • description (str) -- The description of the scheduled event.

  • scheduled_start_time (datetime) -- The scheduled event start time.

  • scheduled_end_time (Optional[datetime]) -- The scheduled event end time, if any.

  • privacy_level (int) -- The privacy level of the scheduled event.

  • entity_type (int) -- The type of the scheduled event.

  • entity_id (Optional[Snowflake]) -- The ID of the entity associated with the scheduled event.

  • entity_metadata (Optional[EventMetadata]) -- Additional metadata associated with the scheduled event.

  • creator (Optional[User]) -- The user that created the scheduled event.

  • user_count (Optional[int]) -- The number of users subscribed to the scheduled event.

  • status (int) -- The status of the scheduled event

  • image (Optional[str]) -- The hash containing the image of an event, if applicable.

class interactions.api.models.guild.WelcomeScreen(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing the welcome screen shown for community guilds.

चर पद :
  • description (Optional[str]) -- The description of the welcome screen.

  • welcome_channels (List[WelcomeChannels]) -- A list of welcome channels of the welcome screen.

class interactions.api.models.guild.Guild(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing how a guild is registered.

टिप्पणी

Most of these optionals are actually declared with their value upon instantiation but are kept like this since this class object is meant to be more broad and generalized.

चर पद :
  • id (Snowflake) -- The ID of the guild.

  • name (str) -- The name of the guild.

  • icon (Optional[str]) -- The icon of the guild.

  • icon_hash (Optional[str]) -- The hashed version of the icon of the guild.

  • splash (Optional[str]) -- The invite splash banner of the guild.

  • discovery_splash (Optional[str]) -- The discovery splash banner of the guild.

  • owner (Optional[bool]) -- Whether the guild is owned.

  • owner_id (Snowflake) -- The ID of the owner of the guild.

  • permissions (Optional[Permissions]) -- The permissions of the guild.

  • region (Optional[str]) -- The geographical region of the guild.

  • afk_channel_id (Optional[Snowflake]) -- The AFK voice channel of the guild.

  • afk_timeout (int) -- The timeout of the AFK voice channel of the guild.

  • widget_enabled (Optional[bool]) -- Whether widgets are enabled in the guild.

  • widget_channel_id (Optional[Snowflake]) -- The channel ID of the widget in the guild.

  • verification_level (int) -- The level of user verification of the guild.

  • default_message_notifications (int) -- The default message notifications setting of the guild.

  • explicit_content_filter (int) -- The explicit content filter setting level of the guild.

  • roles (List[Role]) -- The list of roles in the guild.

  • emojis (List[Emoji]) -- The list of emojis from the guild.

  • features (List[GuildFeature]) -- The list of features of the guild.

  • mfa_level (int) -- The MFA level of the guild.

  • application_id (Optional[Snowflake]) -- The application ID of the guild.

  • system_channel_id (Optional[Snowflake]) -- The channel ID of the system of the guild.

  • rules_channel_id (Optional[Snowflake]) -- The channel ID of Discord's defined "rules" channel of the guild.

  • joined_at (Optional[datetime]) -- The timestamp the member joined the guild.

  • large (Optional[bool]) -- Whether the guild is considered "large."

  • unavailable (Optional[bool]) -- Whether the guild is unavailable to access.

  • member_count (Optional[int]) -- The amount of members in the guild.

  • members (Optional[List[Member]]) -- The members in the guild.

  • channels (Optional[List[Channel]]) -- The channels in the guild.

  • threads (Optional[List[Thread]]) -- All known threads in the guild.

  • presences (Optional[List[PresenceUpdate]]) -- The list of presences in the guild.

  • max_presences (Optional[int]) -- The maximum amount of presences allowed in the guild.

  • max_members (Optional[int]) -- The maximum amount of members allowed in the guild.

  • vanity_url_code (Optional[str]) -- The vanity URL of the guild.

  • description (Optional[str]) -- The description of the guild.

  • banner (Optional[str]) -- The banner of the guild.

  • premium_tier (int) -- The server boost level of the guild.

  • premium_subscription_count (Optional[int]) -- The amount of server boosters in the guild.

  • preferred_locale (str) -- The "preferred" local region of the guild.

  • public_updates_channel_id (Optional[Snowflake]) -- The channel ID for community updates of the guild.

  • max_video_channel_users (Optional[int]) -- The maximum amount of video streaming members in a channel allowed in a guild.

  • approximate_member_count (Optional[int]) -- The approximate amount of members in the guild.

  • approximate_presence_count (Optional[int]) -- The approximate amount of presences in the guild.

  • welcome_screen (Optional[WelcomeScreen]) -- The welcome screen of the guild.

  • nsfw_level (int) -- The NSFW safety filter level of the guild.

  • stage_instances (Optional[List[StageInstance]]) -- The stage instance of the guild.

  • stickers (Optional[List[Sticker]]) -- The list of stickers from the guild.

  • premium_progress_bar_enabled (Optional[bool]) -- Whether the guild has the boost progress bar enabled.

property voice_states: List[VoiceState]#

संस्करण 4.4.0 से नया .

Gets all voice states of the guild.

प्रदत्त प्रकार :

List[VoiceState]

property mapped_voice_states: Dict[int, List[VoiceState]]#

संस्करण 4.4.0 से नया .

Returns all the voice states mapped after their channel id.

प्रदत्त प्रकार :

Dict[int, List[VoiceState]]

property created_at: datetime#

संस्करण 4.4.0 से नया .

Returns when the guild was created.

async ban(member_id, seconds=0, minutes=<interactions.MISSING>, hours=<interactions.MISSING>, days=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

संस्करण 4.3.2 से अलग : Method has been aligned to changes in the Discord API. You can now input days, hours, minutes and seconds, as long as it doesn't exceed 604800 seconds in total for deleting messages, instead of only days.

Bans a member from the guild.

मापदण्ड:
  • member_id (Union[int, Member, Snowflake]) -- The id of the member to ban

  • seconds (Optional[int]) -- Number of seconds to delete messages, from 0 to 604800. Defaults to 0

  • minutes (Optional[int]) -- Number of minutes to delete messages, from 0 to 10080

  • hours (Optional[int]) -- Number of hours to delete messages, from 0 to 168

  • days (Optional[int]) -- Number of days to delete messages, from 0 to 7

  • reason (Optional[str]) -- The reason of the ban

async remove_ban(user_id, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Removes the ban of a user.

मापदण्ड:
  • user_id (Union[int, Snowflake]) -- The id of the user to remove the ban from

  • reason (Optional[str]) -- The reason for the removal of the ban

async kick(member_id, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Kicks a member from the guild.

मापदण्ड:
  • member_id (Union[int, Member, Snowflake]) -- The id of the member to kick

  • reason (Optional[str]) -- The reason for the kick

async add_member_role(role, member_id, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

This method adds a role to a member.

मापदण्ड:
  • role (Union[Role, int, Snowflake]) -- The role to add. Either Role object or role_id

  • member_id (Union[Member, int, Snowflake]) -- The id of the member to add the roles to

  • reason (Optional[str]) -- The reason why the roles are added

async remove_member_role(role, member_id, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

This method removes a or multiple role(s) from a member.

मापदण्ड:
  • role (Union[Role, int, Snowflake]) -- The role to remove. Either Role object or role_id

  • member_id (Union[Member, int, Snowflake]) -- The id of the member to remove the roles from

  • reason (Optional[str]) -- The reason why the roles are removed

async create_role(name, permissions=<interactions.MISSING>, color=0, hoist=False, icon=<interactions.MISSING>, unicode_emoji=<interactions.MISSING>, mentionable=False, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Creates a new role in the guild.

मापदण्ड:
  • name (str) -- The name of the role

  • color (Optional[int]) -- RGB color value as integer, default 0

  • permissions (Optional[Union[Permissions, int]]) -- Bitwise value of the enabled/disabled permissions

  • hoist (Optional[bool]) -- Whether the role should be displayed separately in the sidebar, default False

  • icon (Optional[Image]) -- The role's icon image (if the guild has the ROLE_ICONS feature)

  • unicode_emoji (Optional[str]) -- The role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature)

  • mentionable (Optional[bool]) -- Whether the role should be mentionable, default False

  • reason (Optional[str]) -- The reason why the role is created, default None

प्रदत्त :

The created Role

प्रदत्त प्रकार :

Role

async get_member(member_id)[स्रोत]#

संस्करण 4.0.2 से नया .

Searches for the member with specified id in the guild and returns the member as member object.

मापदण्ड:

member_id (Union[int, Snowflake]) -- The id of the member to search for

प्रदत्त :

The member searched for

प्रदत्त प्रकार :

Member

async delete_channel(channel_id)[स्रोत]#

संस्करण 4.0.2 से नया .

Deletes a channel from the guild.

मापदण्ड:

channel_id (Union[int, Snowflake, Channel]) -- The id of the channel to delete

async delete_role(role_id, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Deletes a role from the guild.

मापदण्ड:
  • role_id (Union[int, Snowflake, Role]) -- The id of the role to delete

  • reason (Optional[str]) -- The reason of the deletion

async modify_role(role_id, name=<interactions.MISSING>, permissions=<interactions.MISSING>, color=<interactions.MISSING>, hoist=<interactions.MISSING>, icon=<interactions.MISSING>, unicode_emoji=<interactions.MISSING>, mentionable=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Edits a role in the guild.

मापदण्ड:
  • role_id (Union[int, Snowflake, Role]) -- The id of the role to edit

  • name (Optional[str]) -- The name of the role, defaults to the current value of the role

  • color (Optional[int]) -- RGB color value as integer, defaults to the current value of the role

  • permissions (Optional[Union[Permissions, int]]) -- Bitwise value of the enabled/disabled permissions, defaults to the current value of the role

  • hoist (Optional[bool]) -- Whether the role should be displayed separately in the sidebar, defaults to the current value of the role

  • icon (Optional[Image]) -- The role's icon image (if the guild has the ROLE_ICONS feature), defaults to the current value of the role

  • unicode_emoji (Optional[str]) -- The role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature), defaults to the current value of the role

  • mentionable (Optional[bool]) -- Whether the role should be mentionable, defaults to the current value of the role

  • reason (Optional[str]) -- The reason why the role is edited, default None

प्रदत्त :

The modified role object

प्रदत्त प्रकार :

Role

async create_thread(name, channel_id, type=ChannelType.PUBLIC_THREAD, auto_archive_duration=<interactions.MISSING>, invitable=<interactions.MISSING>, message_id=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.1.0 से नया .

Creates a thread in the specified channel.

मापदण्ड:
  • name (str) -- The name of the thread

  • channel_id (Union[int, Snowflake, Channel]) -- The id of the channel to create the thread in

  • auto_archive_duration (Optional[int]) -- duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080

  • type (Optional[ChannelType]) -- The type of thread, defaults to public. ignored if creating thread from a message

  • invitable (Optional[bool]) -- Boolean to display if the Thread is open to join or private.

  • message_id (Optional[Union[int, Snowflake, Message]]) -- An optional message to create a thread from.

  • reason (Optional[str]) -- An optional reason for the audit log

प्रदत्त :

The created thread

प्रदत्त प्रकार :

Channel

async create_channel(name, type, topic=<interactions.MISSING>, bitrate=<interactions.MISSING>, user_limit=<interactions.MISSING>, rate_limit_per_user=<interactions.MISSING>, position=<interactions.MISSING>, permission_overwrites=<interactions.MISSING>, parent_id=<interactions.MISSING>, nsfw=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Creates a channel in the guild.

मापदण्ड:
  • name (str) -- The name of the channel

  • type (ChannelType) -- The type of the channel

  • topic (Optional[str]) -- The topic of that channel

  • bitrate (Optional[int]) -- (voice channel only) The bitrate (in bits) of the voice channel

  • user_limit (Optional[int]) -- (voice channel only) Maximum amount of users in the channel

  • rate_limit_per_use (Optional[int]) -- Amount of seconds a user has to wait before sending another message (0-21600)

  • position (Optional[int]) -- Sorting position of the channel

  • parent_id (Optional[Union[int, Channel, Snowflake]]) -- The id of the parent category for a channel

  • permission_overwrites (Optional[List[Overwrite]]) -- The permission overwrites, if any

  • nsfw (Optional[bool]) -- Whether the channel is nsfw or not, default False

  • reason (Optional[str]) -- The reason for the creation

प्रदत्त :

The created channel

प्रदत्त प्रकार :

Channel

async clone_channel(channel_id)[स्रोत]#

संस्करण 4.3.0 से नया .

Clones a channel of the guild.

मापदण्ड:

channel_id (Union[int, Snowflake, Channel]) -- The id of the channel to clone

प्रदत्त :

The cloned channel

प्रदत्त प्रकार :

Channel

async modify_channel(channel_id, name=<interactions.MISSING>, topic=<interactions.MISSING>, bitrate=<interactions.MISSING>, user_limit=<interactions.MISSING>, rate_limit_per_user=<interactions.MISSING>, position=<interactions.MISSING>, permission_overwrites=<interactions.MISSING>, parent_id=<interactions.MISSING>, nsfw=<interactions.MISSING>, archived=<interactions.MISSING>, auto_archive_duration=<interactions.MISSING>, locked=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Edits a channel of the guild.

संस्करण 4.2.0:: से नया : The fields archived, auto_archive_duration and locked require the provided channel to be a thread.

मापदण्ड:
  • channel_id (Union[int, Snowflake, Channel]) -- The id of the channel to modify

  • name (str) -- The name of the channel, defaults to the current value of the channel

  • topic (Optional[str]) -- The topic of that channel, defaults to the current value of the channel

  • bitrate (Optional[int]) -- (voice channel only) The bitrate (in bits) of the voice channel, defaults to the current value of the channel

  • user_limit (Optional[int]) -- (voice channel only) Maximum amount of users in the channel, defaults to the current value of the channel

  • rate_limit_per_user (Optional[int]) -- Amount of seconds a user has to wait before sending another message (0-21600), defaults to the current value of the channel

  • position (Optional[int]) -- Sorting position of the channel, defaults to the current value of the channel

  • parent_id (Optional[int]) -- The id of the parent category for a channel, defaults to the current value of the channel

  • permission_overwrites (Optional[Overwrite]) -- The permission overwrites, if any

  • nsfw (Optional[bool]) -- Whether the channel is nsfw or not, defaults to the current value of the channel

  • archived (Optional[bool]) --

    संस्करण 4.2.0 से नया .

    Whether the thread is archived

  • auto_archive_duration (Optional[Literal[60, 1440, 4320, 10080]]) --

    संस्करण 4.2.0 से नया .

    The time after the thread is automatically archived. One of 60, 1440, 4320, 10080

  • locked (Optional[bool]) --

    संस्करण 4.2.0 से नया .

    Whether the thread is locked

  • reason (Optional[str]) -- The reason for the edit

प्रदत्त :

The modified channel

प्रदत्त प्रकार :

Channel

async modify_member(member_id, nick=<interactions.MISSING>, roles=<interactions.MISSING>, mute=<interactions.MISSING>, deaf=<interactions.MISSING>, channel_id=<interactions.MISSING>, communication_disabled_until=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Modifies a member of the guild.

मापदण्ड:
  • member_id (Union[int, Snowflake, Member]) -- The id of the member to modify

  • nick (Optional[str]) -- The nickname of the member

  • roles (Optional[List[int]]) -- A list of all role ids the member has

  • mute (Optional[bool]) -- whether the user is muted in voice channels

  • deaf (Optional[bool]) -- whether the user is deafened in voice channels

  • channel_id (Optional[int]) -- id of channel to move user to (if they are connected to voice)

  • communication_disabled_until (Optional[datetime.isoformat]) -- 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)

  • reason (Optional[str]) -- The reason of the modifying

प्रदत्त :

The modified member

प्रदत्त प्रकार :

Member

async get_preview()[स्रोत]#

संस्करण 4.0.2 से नया .

Get the guild's preview.

प्रदत्त :

the guild preview as object

प्रदत्त प्रकार :

GuildPreview

async leave()[स्रोत]#

संस्करण 4.0.2 से नया .

Removes the bot from the guild.

async modify(name=<interactions.MISSING>, verification_level=<interactions.MISSING>, default_message_notifications=<interactions.MISSING>, explicit_content_filter=<interactions.MISSING>, afk_channel_id=<interactions.MISSING>, afk_timeout=<interactions.MISSING>, icon=<interactions.MISSING>, owner_id=<interactions.MISSING>, splash=<interactions.MISSING>, discovery_splash=<interactions.MISSING>, banner=<interactions.MISSING>, system_channel_id=<interactions.MISSING>, suppress_join_notifications=<interactions.MISSING>, suppress_premium_subscriptions=<interactions.MISSING>, suppress_guild_reminder_notifications=<interactions.MISSING>, suppress_join_notification_replies=<interactions.MISSING>, rules_channel_id=<interactions.MISSING>, public_updates_channel_id=<interactions.MISSING>, preferred_locale=<interactions.MISSING>, description=<interactions.MISSING>, premium_progress_bar_enabled=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Modifies the current guild.

मापदण्ड:
  • name (Optional[str]) -- The new name of the guild

  • verification_level (Optional[VerificationLevel]) -- The verification level of the guild

  • default_message_notifications (Optional[DefaultMessageNotificationLevel]) -- The default message notification level for members

  • explicit_content_filter (Optional[ExplicitContentFilterLevel]) -- The explicit content filter level for media content

  • afk_channel_id (Optional[int]) -- The id for the afk voice channel

  • afk_timeout (Optional[int]) -- Afk timeout in seconds

  • icon (Optional[Image]) --

    संस्करण 4.2.0 से नया .

    1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature)

  • owner_id (Optional[int]) -- The id of the user to transfer the guild ownership to. You must be the owner to perform this

  • splash (Optional[Image]) --

    संस्करण 4.2.0 से नया .

    16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature)

  • discovery_splash (Optional[Image]) --

    संस्करण 4.2.0 से नया .

    16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature)

  • banner (Optional[Image]) --

    संस्करण 4.2.0 से नया .

    16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated gif when the server has the ANIMATED_BANNER feature)

  • system_channel_id (Optional[int]) -- The id of the channel where guild notices such as welcome messages and boost events are posted

  • suppress_join_notifications (Optional[bool]) -- Whether to suppress member join notifications in the system channel or not

  • suppress_premium_subscriptions (Optional[bool]) -- Whether to suppress server boost notifications in the system channel or not

  • suppress_guild_reminder_notifications (Optional[bool]) -- Whether to suppress server setup tips in the system channel or not

  • suppress_join_notification_replies (Optional[bool]) -- Whether to hide member join sticker reply buttons in the system channel or not

  • rules_channel_id (Optional[int]) -- The id of the channel where guilds display rules and/or guidelines

  • public_updates_channel_id (Optional[int]) -- The id of the channel where admins and moderators of community guilds receive notices from Discord

  • preferred_locale (Optional[str]) -- The preferred locale of a community guild used in server discovery and notices from Discord; defaults to "en-US"

  • description (Optional[str]) -- The description for the guild, if the guild is discoverable

  • premium_progress_bar_enabled (Optional[bool]) -- Whether the guild's boost progress bar is enabled

  • reason (Optional[str]) -- The reason for the modifying

प्रदत्त :

The modified guild

प्रदत्त प्रकार :

Guild

async set_name(name, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the name of the guild.

मापदण्ड:
  • name (str) -- The new name of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_verification_level(verification_level, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the verification level of the guild.

मापदण्ड:
  • verification_level (VerificationLevel) -- The new verification level of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_default_message_notifications(default_message_notifications, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the default message notifications level of the guild.

मापदण्ड:
  • default_message_notifications (DefaultMessageNotificationLevel) -- The new default message notification level of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_explicit_content_filter(explicit_content_filter, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the explicit content filter level of the guild.

मापदण्ड:
  • explicit_content_filter (ExplicitContentFilterLevel) -- The new explicit content filter level of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_afk_channel(afk_channel_id, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the afk channel of the guild.

मापदण्ड:
  • afk_channel_id (int) -- The new name of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_afk_timeout(afk_timeout, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the afk timeout of the guild.

मापदण्ड:
  • afk_timeout (int) -- The new afk timeout of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_system_channel(system_channel_id, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the system channel of the guild.

मापदण्ड:
  • system_channel_id (int) -- The new system channel id of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_rules_channel(rules_channel_id, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the rules channel of the guild.

मापदण्ड:
  • rules_channel_id (int) -- The new rules channel id of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_public_updates_channel(public_updates_channel_id, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the public updates channel of the guild.

मापदण्ड:
  • public_updates_channel_id (int) -- The new public updates channel id of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_preferred_locale(preferred_locale, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the preferred locale of the guild.

मापदण्ड:
  • preferred_locale (str) -- The new preferredlocale of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_description(description, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the description of the guild.

मापदण्ड:
  • description (str) -- The new description of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_premium_progress_bar_enabled(premium_progress_bar_enabled, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the visibility of the premium progress bar of the guild.

मापदण्ड:
  • premium_progress_bar_enabled (bool) -- Whether the bar is enabled or not

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_icon(icon, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the icon of the guild.

मापदण्ड:
  • icon (Image) -- The new icon of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_splash(splash, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the splash of the guild.

मापदण्ड:
  • splash (Image) -- The new splash of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_discovery_splash(discovery_splash, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the discovery_splash of the guild.

मापदण्ड:
  • discovery_splash (Image) -- The new discovery_splash of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async set_banner(banner, *, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Sets the banner of the guild.

मापदण्ड:
  • banner (Image) -- The new banner of the guild

  • reason (Optional[str]) -- The reason of the edit

प्रदत्त प्रकार :

Guild

async create_scheduled_event(name, entity_type, scheduled_start_time, scheduled_end_time=<interactions.MISSING>, entity_metadata=<interactions.MISSING>, channel_id=<interactions.MISSING>, description=<interactions.MISSING>, image=<interactions.MISSING>)[स्रोत]#

संस्करण 4.0.2 से नया .

Creates a scheduled event for the guild.

मापदण्ड:
  • name (str) -- The name of the event

  • entity_type (EntityType) -- The entity type of the scheduled event

  • scheduled_start_time (datetime.isoformat) -- The time to schedule the scheduled event

  • scheduled_end_time (Optional[datetime.isoformat]) -- The time when the scheduled event is scheduled to end

  • entity_metadata (Optional[EventMetadata]) -- The entity metadata of the scheduled event

  • channel_id (Optional[int]) -- The channel id of the scheduled event.

  • description (Optional[str]) -- The description of the scheduled event

  • image (Optional[Image]) -- The cover image of the scheduled event

प्रदत्त :

The created event

प्रदत्त प्रकार :

ScheduledEvents

async get_scheduled_events(with_user_count)[स्रोत]#

संस्करण 4.3.2 से नया .

Gets all scheduled events of the guild.

मापदण्ड:

with_user_count (bool) -- A boolean to include number of users subscribed to the associated event, if given.

प्रदत्त :

The sheduled events of the guild.

प्रदत्त प्रकार :

List[ScheduledEvents]

async modify_scheduled_event(event_id, name=<interactions.MISSING>, entity_type=<interactions.MISSING>, scheduled_start_time=<interactions.MISSING>, scheduled_end_time=<interactions.MISSING>, entity_metadata=<interactions.MISSING>, channel_id=<interactions.MISSING>, description=<interactions.MISSING>, status=<interactions.MISSING>, image=<interactions.MISSING>)[स्रोत]#

संस्करण 4.0.2 से नया .

Edits a scheduled event of the guild.

मापदण्ड:
  • event_id (Union[int, ScheduledEvents, Snowflake]) -- The id of the event to edit

  • name (Optional[str]) -- The name of the event

  • entity_type (Optional[EntityType]) -- The entity type of the scheduled event

  • scheduled_start_time (Optional[datetime.isoformat]) -- The time to schedule the scheduled event

  • scheduled_end_time (Optional[datetime.isoformat]) -- The time when the scheduled event is scheduled to end

  • entity_metadata (Optional[EventMetadata]) -- The entity metadata of the scheduled event

  • channel_id (Optional[int]) -- The channel id of the scheduled event.

  • description (Optional[str]) -- The description of the scheduled event

  • status (Optional[EventStatus]) -- The status of the scheduled event

  • image (Optional[Image]) -- The cover image of the scheduled event

प्रदत्त :

The modified event

प्रदत्त प्रकार :

ScheduledEvents

async delete_scheduled_event(event_id)[स्रोत]#

संस्करण 4.0.2 से नया .

Deletes a scheduled event of the guild.

मापदण्ड:

event_id (Union[int, ScheduledEvents, Snowflake]) -- The id of the event to delete

async get_all_channels()[स्रोत]#

संस्करण 4.0.2 से नया .

Gets all channels of the guild as list.

प्रदत्त :

The channels of the guild.

प्रदत्त प्रकार :

List[Channel]

async get_all_active_threads()[स्रोत]#

संस्करण 4.3.0 से नया .

Gets all active threads of the guild.

प्रदत्त :

The threads of the guild.

प्रदत्त प्रकार :

List[Thread]

async get_all_roles()[स्रोत]#

संस्करण 4.0.2 से नया .

Gets all roles of the guild as list.

प्रदत्त :

The roles of the guild.

प्रदत्त प्रकार :

List[Role]

async get_role(role_id)[स्रोत]#

संस्करण 4.2.0 से नया .

Gets a role of the guild.

मापदण्ड:

role_id (int) -- The id of the role to get

प्रदत्त :

The role as object

प्रदत्त प्रकार :

Role

async modify_role_position(role_id, position, reason=None)[स्रोत]#

संस्करण 4.0.2 से नया .

Modifies the position of a role in the guild.

मापदण्ड:
  • role_id (Union[Role, int]) -- The id of the role to modify the position of

  • position (int) -- The new position of the role

  • reason (Optional[str]) -- The reason for the modifying

प्रदत्त :

List of guild roles with updated hierarchy

प्रदत्त प्रकार :

List[Role]

async modify_role_positions(changes, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Modifies the positions of multiple roles in the guild.

मापदण्ड:
  • changes (List[dict]) -- A list of dicts containing roles (id) and their new positions (position)

  • reason (Optional[str]) -- The reason for the modifying

प्रदत्त :

List of guild roles with updated hierarchy

प्रदत्त प्रकार :

List[Role]

async get_bans(limit=1000, before=<interactions.MISSING>, after=<interactions.MISSING>)[स्रोत]#

संस्करण 4.0.2 से नया .

संस्करण 4.2.0 से अलग : The method now gets an amount of bans as the endpoint on the Discord API has been paginated. To get all bans use the get_all_bans() method.

Gets a list of banned users.

मापदण्ड:
  • limit (Optional[int]) -- Number of users to return. Defaults to 1000.

  • before (Optional[int]) -- Consider only users before the given User ID snowflake.

  • after (Optional[int]) -- Consider only users after the given User ID snowflake.

प्रदत्त :

List of banned users with reasons

प्रदत्त प्रकार :

List[Dict[str, User]]

async get_all_bans()[स्रोत]#

संस्करण 4.2.0 से नया .

Gets all bans of the guild.

प्रदत्त :

List of banned users with reasons

प्रदत्त प्रकार :

List[Dict[str, User]]

async prune(days=7, compute_prune_count=True, include_roles=<interactions.MISSING>)[स्रोत]#

संस्करण 4.3.2 से नया .

Begins a prune operation.

मापदण्ड:
  • days (Optional[int]) -- Number of days to count, minimum 1, maximum 30. Defaults to 7.

  • compute_prune_count (Optional[bool]) -- Whether the returned "pruned" dict contains the computed prune count or None.

  • include_roles (Optional[Union[List[Role], List[int], List[Snowflake], List[str]]]) -- Role IDs to include, if given.

प्रदत्त :

The number of pruned members, if compute_prune_count is not false. Otherwise returns None.

प्रदत्त प्रकार :

Optional[int]

async get_prune_count(days=7, include_roles=<interactions.MISSING>)[स्रोत]#

संस्करण 4.3.2 से नया .

Returns the number of members that would be removed in a prune operation.

मापदण्ड:
  • days (Optional[int]) -- Number of days to count, minimum 1, maximum 30. Defaults to 7.

  • include_roles (Optional[Union[List[Role], List[int], List[Snowflake], List[str]]]) -- Role IDs to include, if given.

प्रदत्त :

The number of members that would be pruned.

प्रदत्त प्रकार :

int

async get_emoji(emoji_id)[स्रोत]#

संस्करण 4.2.0 से नया .

Gets an emoji of the guild and returns it.

मापदण्ड:

emoji_id (int) -- The id of the emoji

प्रदत्त :

The specified Emoji, if found

प्रदत्त प्रकार :

Emoji

async get_all_emoji()[स्रोत]#

संस्करण 4.2.0 से नया .

Gets all emojis of a guild.

प्रदत्त :

All emojis of the guild

प्रदत्त प्रकार :

List[Emoji]

async create_emoji(image, name=<interactions.MISSING>, roles=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Creates an Emoji in the guild.

मापदण्ड:
  • image (Image) -- The image of the emoji.

  • name (Optional[str]) -- The name of the emoji. If not specified, the filename will be used

  • roles (Optional[Union[List[Role], List[int]]]) -- Roles allowed to use this emoji

  • reason (Optional[str]) -- The reason of the creation

प्रदत्त प्रकार :

Emoji

async modify_emoji(emoji_id, name=<interactions.MISSING>, roles=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.4.0 से नया .

Edits an Emoji in the guild.

मापदण्ड:
  • emoji_id (Union[int, Snowflake, Emoji]) -- The id of the emoji to edit

  • name (Optional[str]) -- The name of the emoji. If not specified, the filename will be used

  • roles (Optional[Union[List[Role], List[int]]]) -- Roles allowed to use this emoji

  • reason (Optional[str]) -- The reason of the modification

प्रदत्त :

The modified emoji object

प्रदत्त प्रकार :

Emoji

async delete_emoji(emoji, reason=None)[स्रोत]#

संस्करण 4.2.0 से नया .

Deletes an emoji of the guild.

मापदण्ड:
  • emoji (Union[Emoji, int]) -- The emoji or the id of the emoji to delete

  • reason (Optional[str]) -- The reason of the deletion

async get_stickers()[स्रोत]#

संस्करण 4.3.2 से नया .

Get the stickers for a guild.

प्रदत्त :

List of stickers of the guild.

प्रदत्त प्रकार :

Optional[List[Sticker]]

async get_nitro_sticker_packs()[स्रोत]#

संस्करण 4.3.2 से नया .

Gets the list of sticker packs available to Nitro subscribers.

प्रदत्त :

List of sticker packs.

प्रदत्त प्रकार :

List[StickerPack]

async create_sticker(file, tags, name=<interactions.MISSING>, description=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.3.2 से नया .

Creates a new sticker for the guild.

मापदण्ड:
  • file (File) -- The file of the sticker.

  • tags (str) -- The tags of the sticker.

  • name (Optional[str]) -- The name of the sticker.

  • description (Optional[str]) -- The description of the sticker.

  • reason (Optional[str]) -- The reason of the creation.

प्रदत्त :

Created sticker for the guild.

प्रदत्त प्रकार :

Sticker

async modify_sticker(sticker_id, name=<interactions.MISSING>, description=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.3.2 से नया .

Modifies the sticker of the guild.

मापदण्ड:
  • sticker_id (Union[Sticker, Snowflake, int]) -- The sticker or ID of the sticker.

  • name (Optional[str]) -- The name of the sticker.

  • description (Optional[str]) -- The description of the sticker.

  • reason (Optional[str]) -- The reason of the modification.

प्रदत्त :

Modified sticker.

प्रदत्त प्रकार :

Sticker

async delete_sticker(sticker_id, reason=None)[स्रोत]#

संस्करण 4.3.2 से नया .

Deletes the sticker of the guild.

मापदण्ड:
  • sticker_id (Union[Sticker, Snowflake, int]) -- The sticker or ID of the sticker.

  • reason (Optional[str]) -- The reason of the deletion.

async get_list_of_members(limit=1, after=<interactions.MISSING>)[स्रोत]#

संस्करण 4.2.0 से नया .

Lists the members of a guild.

मापदण्ड:
  • limit (Optional[int]) -- How many members to get from the API. Max is 1000.

  • after (Optional[Union[Member, int]]) -- Get only Members after this member.

प्रदत्त :

A list of members

प्रदत्त प्रकार :

List[Member]

async search_members(query, limit=1)[स्रोत]#

संस्करण 4.2.0 से नया .

Search the guild for members whose username or nickname starts with provided string.

मापदण्ड:
  • query (str) -- The string to search for

  • limit (Optional[int]) -- The number of members to return.

प्रदत्त :

A list of matching members

प्रदत्त प्रकार :

List[Member]

async get_all_members()[स्रोत]#

संस्करण 4.2.0 से नया .

संस्करण 4.3.2 से प्रतिबंधित : Use get_members() instead.

Gets all members of a guild.

चेतावनी

Calling this method can lead to rate-limits in larger guilds.

प्रदत्त :

Returns a list of all members of the guild

प्रदत्त प्रकार :

List[Member]

get_members(start_at=<interactions.MISSING>, maximum=inf, check=None)[स्रोत]#

संस्करण 4.3.2 से नया .

मापदण्ड:
  • start_at (Optional[Union[int, str, Snowflake, Member]]) -- The member to begin getting the members from

  • maximum (Optional[int]) -- A set maximum of members to get before stopping the iteration

  • check (Optional[Callable[[Member], Union[bool, Awaitable[bool]]]]) -- A custom check to ignore certain members

प्रदत्त :

An asynchronous iterator over the members of the guild

प्रदत्त प्रकार :

AsyncMembersIterator

async get_webhooks()[स्रोत]#

संस्करण 4.3.0 से नया .

Get all webhooks of a guild.

प्रदत्त प्रकार :

List[Webhook]

async list_auto_moderation_rules()[स्रोत]#

संस्करण 4.3.0 से नया .

Lists all AutoMod rules.

प्रदत्त प्रकार :

List[AutoModerationRule]

async get_auto_moderation_rule(rule_id)[स्रोत]#

संस्करण 4.3.0 से नया .

Gets a AutoMod rule from its ID

मापदण्ड:

rule_id (Union[int, Snowflake]) -- The ID of the rule to get

प्रदत्त :

A AutoMod rule

प्रदत्त प्रकार :

AutoModerationRule

async create_auto_moderation_rule(name, trigger_type, actions, trigger_metadata=<interactions.MISSING>, enabled=False, exempt_roles=<interactions.MISSING>, exempt_channels=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.3.0 से नया .

Creates an AutoMod rule

मापदण्ड:
  • name (str) -- The name of the new rule.

  • trigger_type (AutoModTriggerType) -- The trigger type of the new rule.

  • trigger_metadata (Optional[AutoModTriggerMetadata]) -- The trigger metadata payload representation. This can be omitted based on the trigger type.

  • actions (List[AutoModAction]) -- The actions that will execute when the rule is triggered.

  • enabled (Optional[bool]) -- Whether the rule will be enabled upon creation. False by default.

  • exempt_roles (Optional[List[int]]) -- The role IDs that are whitelisted by the rule, if given. The maximum is 20.

  • exempt_channels (Optional[List[int]]) -- The channel IDs that are whitelisted by the rule, if given. The maximum is 20

  • reason (Optional[str]) -- The reason of the creation

प्रदत्त :

The new AutoMod rule

प्रदत्त प्रकार :

AutoModerationRule

async modify_auto_moderation_rule(rule, name=<interactions.MISSING>, trigger_type=<interactions.MISSING>, actions=<interactions.MISSING>, trigger_metadata=<interactions.MISSING>, enabled=<interactions.MISSING>, exempt_roles=<interactions.MISSING>, exempt_channels=<interactions.MISSING>, reason=None)[स्रोत]#

संस्करण 4.3.0 से नया .

Edits an AutoMod rule

मापदण्ड:
  • rule (Union[int, Snowflake, AutoModerationRule]) -- The rule to modify

  • name (str) -- The name of the new rule.

  • trigger_type (AutoModTriggerType) -- The trigger type of the new rule.

  • trigger_metadata (Optional[AutoModTriggerMetadata]) -- The trigger metadata payload representation. This can be omitted based on the trigger type.

  • actions (List[AutoModAction]) -- The actions that will execute when the rule is triggered.

  • enabled (Optional[bool]) -- Whether the rule will be enabled upon creation. False by default.

  • exempt_roles (Optional[List[int]]) -- The role IDs that are whitelisted by the rule, if given. The maximum is 20.

  • exempt_channels (Optional[List[int]]) -- The channel IDs that are whitelisted by the rule, if given. The maximum is 20

  • reason (Optional[str]) -- The reason of the creation

प्रदत्त :

The new AutoMod rule

प्रदत्त प्रकार :

AutoModerationRule

async get_audit_logs(limit=100, user_id=<interactions.MISSING>, action_type=<interactions.MISSING>, before=<interactions.MISSING>)[स्रोत]#

संस्करण 4.3.0 से नया .

Gets the audit logs of the guild.

मापदण्ड:
  • limit (Optional[int]) -- How many entries to get, default 100

  • user_id (Optional[Union[User, int, Snowflake]]) -- User ID snowflake. filter the log for actions made by a user.

  • action_type (Optional[Union[int, AuditLogEvents]]) -- The Type of the audit log action.

  • before (Union[int, Snowflake]) -- filter the log before a certain entry id.

प्रदत्त :

The guild audit logs

प्रदत्त प्रकार :

AuditLogs

async get_latest_audit_log_action(of)[स्रोत]#

संस्करण 4.3.0 से नया .

Gets the latest audit log action of either a user or an action type

मापदण्ड:

of (Union[User, Snowflake, AuditLogEvents, int, Tuple[Union[User, Snowflake, int], Union[AuditLogEvents, int]]]) --

The user/user ID or action type to look for.

Detailed description:
  1. User or Member, Snowflake or member or user ID as int/str:
    return:

    The latest audit log entry of this user.

  2. AuditLogEvents or and AuditLogEvent as int representation:
    return:

    The latest audit log entry of this type.

  3. tuple object:
    return:

    The latest audit log entry of this user AND this type combined

प्रदत्त :

The latest AuditLog action that applies to the of parameter

प्रदत्त प्रकार :

AuditLogs

async get_full_audit_logs(user_id=<interactions.MISSING>, action_type=<interactions.MISSING>)[स्रोत]#

संस्करण 4.3.0 से नया .

Gets the full audit log of the guild.

मापदण्ड:
  • user_id (Optional[Union[User, int, Snowflake]]) -- User ID snowflake. filter the log for actions made by a user.

  • action_type (Optional[Union[int, AuditLogEvents]]) -- The type of the audit log action.

प्रदत्त :

The full AuditLog of the guild

प्रदत्त प्रकार :

AuditLogs

async get_invite(invite_code, with_counts=<interactions.MISSING>, with_expiration=<interactions.MISSING>, guild_scheduled_event_id=<interactions.MISSING>)[स्रोत]#

संस्करण 4.3.4 से नया .

Gets the invite using its code.

मापदण्ड:
  • invite_code (str) -- A string representing the invite code.

  • with_counts (Optional[bool]) -- Whether approximate_member_count and approximate_presence_count are returned.

  • with_expiration (Optional[bool]) -- Whether the invite's expiration date is returned.

  • guild_scheduled_event_id (Optional[int]) -- A guild scheduled event's ID.

प्रदत्त :

An invite

प्रदत्त प्रकार :

Invite

async delete_invite(invite_code, reason=None)[स्रोत]#

संस्करण 4.3.4 से नया .

Deletes the invite using its code.

मापदण्ड:
  • invite_code (str) -- A string representing the invite code.

  • reason (Optional[str]) -- The reason of the deletion

async get_invites()[स्रोत]#

संस्करण 4.3.4 से नया .

Gets invites of the guild.

प्रदत्त :

A list of guild invites

प्रदत्त प्रकार :

List[Invite]

async modify_bot_nick(new_nick=<interactions.MISSING>)[स्रोत]#

संस्करण 4.4.0 से नया .

Changes a nickname of the current bot user in a guild.

मापदण्ड:

new_nick (Optional[str]) -- The new nickname, if any.

प्रदत्त :

The modified bot member object

प्रदत्त प्रकार :

Member

property icon_url: str | None#

संस्करण 4.2.0 से नया .

Returns the URL of the guild's icon.

प्रदत्त :

URL of the guild's icon (None will be returned if no icon is set)

प्रदत्त प्रकार :

str

property banner_url: str | None#

संस्करण 4.2.0 से नया .

Returns the URL of the guild's banner.

प्रदत्त :

URL of the guild's banner (None will be returned if no banner is set)

प्रदत्त प्रकार :

str

property splash_url: str | None#

संस्करण 4.2.0 से नया .

Returns the URL of the guild's invite splash banner.

प्रदत्त :

URL of the guild's invite splash banner (None will be returned if no banner is set)

प्रदत्त प्रकार :

str

property discovery_splash_url: str | None#

संस्करण 4.2.0 से नया .

Returns the URL of the guild's discovery splash banner.

प्रदत्त :

URL of the guild's discovery splash banner (None will be returned if no banner is set)

प्रदत्त प्रकार :

str

class interactions.api.models.guild.GuildPreview(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

A class object representing the preview of a guild.

चर पद :
  • id (Snowflake) -- The ID of the guild.

  • name (str) -- The name of the guild.

  • icon (Optional[str]) -- The icon of the guild.

  • splash (Optional[str]) -- The invite splash banner of the guild.

  • discovery_splash (Optional[str]) -- The discovery splash banner of the guild.

  • emojis (List[Emoji]) -- The list of emojis from the guild.

  • features (List[GuildFeatures]) -- The list of features of the guild.

  • approximate_member_count (int) -- The approximate amount of members in the guild.

  • approximate_presence_count (int) -- The approximate amount of presences in the guild.

  • description (Optional[str]) -- The description of the guild.

class interactions.api.models.guild.Invite(kwargs_dict=None, /, **other_kwargs)[स्रोत]#

The invite object.

चर पद :
  • uses (int) -- The amount of uses on this invite.

  • max_uses (int) -- The amount of maximum uses on this invite.

  • max_age (int) -- The maximum age of this invite, in seconds.

  • temporary (bool) -- A detection of whether this invite only grants temporary membership.

  • created_at (datetime) -- The time when this invite was created.

  • expires_at (datetime) -- The time when this invite will expire.

  • type (int) -- The type of this invite.

  • inviter (User) -- The user who created this invite.

  • code (str) -- The code of this invite.

  • guild_id (Optional[int]) -- The guild ID of this invite.

  • channel_id (Optional[int]) -- The channel ID of this invite.

  • target_user_type (Optional[int]) -- The type of the target user of this invite.

  • target_user (Optional[User]) -- The target user of this invite.

  • target_type (Optional[int]) -- The target type of this invite.

  • guild (Optional[Guild]) -- The guild of this invite.

  • channel (Optional[Channel]) -- The channel of this invite.

  • approximate_member_count (Optional[int]) -- The approximate amount of total members in a guild.

  • approximate_presence_count (Optional[int]) -- The aprpoximate amount of online members in a guild.

  • guild_scheduled_event (Optional[ScheduledEvents]) -- A scheduled guild event object included in the invite.

async delete()[स्रोत]#

Deletes the invite

property url: str#

संस्करण 4.3.0 से नया .

Returns the URL of the invite.

class interactions.api.models.guild.AsyncMembersIterator(_client, obj, maximum=inf, start_at=<interactions.MISSING>, check=None)[स्रोत]#

संस्करण 4.3.2 से नया .

A class object that allows iterating through a channel's history.

मापदण्ड:
  • _client (HTTPClient) -- The HTTPClient of the bot

  • obj (Union[int, str, Snowflake, Guild]) -- The guild to get the members from

  • start_at (Optional[Union[int, str, Snowflake, Member]]) -- The member ID to start getting members from (gets all members after that member)

  • check (Optional[Callable[[Member], Union[bool, Awaitable[bool]]]]) -- A check to ignore certain members

  • maximum (Optional[int]) -- A set maximum of members to get before stopping the iteration

async flatten()[स्रोत]#

Returns all remaining items of the iterator as list.

प्रदत्त प्रकार :

List[Member]