OnboardingScreen

Represents a guild onboarding screen.

Attributes

default_channel_ids : None, tuple of int

The channels' identifiers that new members get opted into automatically.

enabled : bool

Whether onboarding is enabled.

guild_id : int

The guild's identifier the onboarding screen is part of.

Onboarding mode.

prompts : None, tuple of OnboardingPrompt

The prompts shown during onboarding and in customize community.

Properties

default_channels

Returns the default channels that new get opted into automatically.

Returns

default_channels : None, tuple of Channel

guild

Returns the onboarding screen's owner guild identifier. If the guild is not cached then returns None.

Returns

guild : None, Guild

Methods

__new__(...)

Creates an onboarding screen instance from the given parameters.

ParameterTypeOptionalKeyword onlyDescription
default_channel_ids

None, iterable of (int, Channel)

The channels' identifiers that new members get opted into automatically.

enabled

bool

Whether onboarding is enabled.

mode

OnboardingMode, int

Onboarding mode.

prompts

None, iterable of OnboardingPrompt

The prompts shown during onboarding and in customize community.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the onboarding screen.

Returns

new : instance<cls>

copy_with(...)

Copies the onboarding screen with the given screen.

ParameterTypeOptionalKeyword onlyDescription
default_channel_ids

None, iterable of (int, Channel)

The channels' identifiers that new members get opted into automatically.

enabled

bool

Whether onboarding is enabled.

mode

OnboardingMode, int

Onboarding mode.

prompts

None, iterable of OnboardingPrompt

The prompts shown during onboarding and in customize community.

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 onboarding screen instance from the given data.

ParameterTypeDescription
data

dict of (str, object) items

Auto moderation rule trigger metadata payload.

Returns

self : instance<cls>

iter_default_channel_ids()

Iterates over the default channels that new get opted into automatically.

This method is an iterable generator.

Yields

default_channel_id : int

iter_default_channels()

Iterates over the default channels that new get opted into automatically.

This method is an iterable generator.

Yields

default_channel : Channel

iter_prompts()

Iterates over the prompts that are shown during onboarding and in customize community.

This method is an iterable generator.

Yields

prompt : OnboardingPrompt

precreate(...)

Precreates an onboarding screen. Since they are not cached, this method just a .__new__ alternative.

ParameterTypeOptionalKeyword onlyDescription
**keyword_parameters

Keyword parameters

Additional parameters defining how the option's fields should be set.

default_channel_ids

None, iterable of (int, Channel)

The channels' identifiers that new members get opted into automatically.

default_channels

None, iterable of (int, Channel)

Alternative of default_channel_ids.

enabled

bool

Whether onboarding is enabled.

guild

int, Guild

Alternative of guild_id.

guild_id

int, Guild

The guild's identifier the onboarding screen is part of.

mode

OnboardingMode, int

Onboarding mode.

prompts

None, iterable of OnboardingPrompt

The prompts shown during onboarding and in customize community.

Returns

self : instance<type<self>>

to_data(...)

Converts the onboarding screen to a json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

Whether default fields should be included as well.

include_internals

bool

False

Whether internal fields (like id-s) should be included.

Returns

data : dict of (str, object) items

__eq__()

Returns whether the two onboarding screen's are equal.

__getattr__()

Drops a rich attribute error.

__hash__()

Returns the onboarding screen's hash value .

__repr__()

Returns the onboarding screen's representation.