GuildDiscovery
Represent a guild's Discovery settings.
Attributes
None
, datetime
When the guild's application was accepted or rejected.
None
, datetime
When the guild applied to guild discovery. Only set if pending.
bool
Whether guild info is shown when the respective guild's emojis are clicked.
None
, tuple
of str
The set discovery search keywords for the guild.
The primary discovery category of the guild.
Guild Discovery sub-categories. Up to 5.
Methods
(...)
__new__Creates a new guild discovery from the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
application_actioned |
| When the guild's application was accepted or rejected. | ||
application_requested |
| When the guild applied to guild discovery. Only set if pending. | ||
emoji_discovery |
| Whether guild info is shown when the respective guild's emojis are clicked. | ||
keywords |
| The set discovery search keywords for the guild. | ||
primary_category |
| The primary discovery category of the guild. | ||
sub_categories |
| 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.
()
copyCopies the guild discovery.
Returns
new : instance<type<self>>
(...)
copy_withCopies the guild discovery with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
application_actioned |
| When the guild's application was accepted or rejected. | ||
application_requested |
| When the guild applied to guild discovery. Only set if pending. | ||
emoji_discovery |
| Whether guild info is shown when the respective guild's emojis are clicked. | ||
keywords |
| The set discovery search keywords for the guild. | ||
primary_category |
| The primary discovery category of the guild. | ||
sub_categories |
| 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.
(data)
from_dataCreates a new guild discovery object from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Guild discovery data. |
Returns
self : instance<cls>
()
iter_keywordsIterates over the keywords of the guild discovery.
This method is an iterable generator.
Yields
keyword : str
()
iter_sub_categoriesIterates over the sub-categories of the guild discovery.
This method is an iterable generator.
Yields
sub_category : DiscoveryCategory
(...)
to_dataConverts the guild discovery to a json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether default values should be included as well. | ||
include_internals |
|
| 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.