GuildDiscovery

Represent a guild's Discovery settings.

Attributes

application_actioned : None, datetime

When the guild's application was accepted or rejected.

application_requested : None, datetime

When the guild applied to guild discovery. Only set if pending.

emoji_discovery : bool

Whether guild info is shown when the respective guild's emojis are clicked.

keywords : None, tuple of str

The set discovery search keywords for the guild.

primary_category : DiscoveryCategory

The primary discovery category of the guild.

sub_categories : None, tuple of DiscoveryCategory

Guild Discovery sub-categories. Up to 5.

Methods

__new__(...)

Creates a new guild discovery from the given fields.

ParameterTypeOptionalKeyword onlyDescription
application_actioned

None, datetime

When the guild's application was accepted or rejected.

application_requested

None, datetime

When the guild applied to guild discovery. Only set if pending.

emoji_discovery

bool

Whether guild info is shown when the respective guild's emojis are clicked.

keywords

None, iterable of str

The set discovery search keywords for the guild.

primary_category

DiscoveryCategory, int

The primary discovery category of the guild.

sub_categories

None, iterable of (int, DiscoveryCategory)

Guild Discovery sub-categories.

Returns

self : instance<cls>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the guild discovery.

Returns

new : instance<type<self>>

copy_with(...)

Copies the guild discovery with the given fields.

ParameterTypeOptionalKeyword onlyDescription
application_actioned

None, datetime

When the guild's application was accepted or rejected.

application_requested

None, datetime

When the guild applied to guild discovery. Only set if pending.

emoji_discovery

bool

Whether guild info is shown when the respective guild's emojis are clicked.

keywords

None, iterable of str

The set discovery search keywords for the guild.

primary_category

DiscoveryCategory, int

The primary discovery category of the guild.

sub_categories

None, iterable of (int, DiscoveryCategory)

Guild Discovery sub-categories.

Returns

new : instance<type<self>>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

from_data(data)

Creates a new guild discovery object from the given data.

ParameterTypeDescription
data

dict of (str, object) items

Guild discovery data.

Returns

self : instance<cls>

iter_keywords()

Iterates over the keywords of the guild discovery.

This method is an iterable generator.

Yields

keyword : str

iter_sub_categories()

Iterates over the sub-categories of the guild discovery.

This method is an iterable generator.

Yields

sub_category : DiscoveryCategory

to_data(...)

Converts the guild discovery to a json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

Whether default values should be included as well.

include_internals

bool

False

Whether internal fields should be included as well.

Returns

data : dict of (str, object) items

__eq__()

Returns whether the two guild discoveries are the same.

__getattr__()

Drops a rich attribute error.

__hash__()

Returns the guild discovery's hash value.

__repr__()

Returns the guild discovery's representation.