MemberImpl

class MemberImpl(val yde: YDEImpl, val json: JsonNode, val guild: Guild, backupUser: User? = null) : Member(source)

Constructors

Link copied to clipboard
constructor(yde: YDEImpl, json: JsonNode, guild: Guild, backupUser: User? = null)

Functions

Link copied to clipboard
open fun addRole(role: Role): CompletableDeferred<NoResult>

Adds a role to this member.

Link copied to clipboard
open fun addRoles(vararg roles: Role): List<CompletableDeferred<NoResult>>
open fun addRoles(roles: List<Role>): List<CompletableDeferred<NoResult>>

Adds a list of roles to this member.

Link copied to clipboard
open fun format(format: String): String

Formats the name of the entity

Link copied to clipboard
open override fun formatTo(formatter: Formatter?, flags: Int, width: Int, precision: Int)

Formats the object using the provided {@link Formatter formatter}.

Link copied to clipboard
Link copied to clipboard
open override fun hasPermission(vararg permission: GuildPermission): Boolean
open override fun hasPermission(permission: Collection<GuildPermission>): Boolean

Checks if the member has a specific permission.

Link copied to clipboard
open fun removeRole(role: Role): CompletableDeferred<NoResult>

Removes a role from this member.

Link copied to clipboard
open fun removeRoles(vararg roles: Role): List<CompletableDeferred<NoResult>>
open fun removeRoles(roles: List<Role>): List<CompletableDeferred<NoResult>>

Removes a list of roles from this member.

Link copied to clipboard
open suspend fun send(): CompletableDeferred<Message>

Sends the message.

Link copied to clipboard
open fun setContent(message: String): SendAble

Sets the content of the message.

Link copied to clipboard
open fun setEmbed(embed: Embed): SendAble

Sets the embed of the message.

Link copied to clipboard
open fun setEmbeds(vararg embeds: Embed): SendAble
open fun setEmbeds(embeds: List<Embed>): SendAble

Sets the embeds of the message.

Link copied to clipboard
open fun setFlag(flag: MessageFlag): SendAble

Set a message flag.

Link copied to clipboard
open fun setFlags(vararg flags: MessageFlag): SendAble
open fun setFlags(flags: List<MessageFlag>): SendAble

Sets the message flags.

Link copied to clipboard
open fun setTts(tts: Boolean): SendAble

Whether the message should be sent with text-to-speech.

Link copied to clipboard
open override fun toString(): String

Converts this entity to a string using the io.github.ydwk.ydwk.util.EntityToStringBuilder.

Properties

Link copied to clipboard
open val asIncrement: Long

The increment of this snowflake.

Link copied to clipboard
open val asProcessId: Long

The process id of this snowflake.

Link copied to clipboard
open val asTimestamp: Long

The timestamp of this snowflake. (Milliseconds since Discord Epoch, the first second of 2015 or 1420070400000.)

Link copied to clipboard
open val asWorkerId: Long

The worker id of this snowflake.

Link copied to clipboard
open val createDmChannel: CompletableDeferred<DmChannel>

Creates a direct message channel with this member.

Link copied to clipboard
open override var deaf: Boolean

Whether the member is deafened in voice channels.

Link copied to clipboard
open override val guild: Guild

Gets thw member's Guild.

Link copied to clipboard
open override val guildAvatar: Avatar?

The member's guild avatar.

Link copied to clipboard
open override var guildAvatarHash: String?

The member's guild avatar hash.

Link copied to clipboard
open val id: String

The id of this snowflake as a String.

Link copied to clipboard
open override val idAsLong: Long

The id of this snowflake as a Long.

Link copied to clipboard
open override val isOwner: Boolean

Whether the member is the owner of the guild.

Link copied to clipboard

Weather this member is timed out.

Link copied to clipboard
open override var joinedAt: String?

The time this member joined the guild.

Link copied to clipboard
open override val json: JsonNode

The json representation of this entity.

Link copied to clipboard

The actual message builder instance.

Link copied to clipboard
open override var mute: Boolean

Whether the member is muted in voice channels.

Link copied to clipboard
open override var name: String
Link copied to clipboard
open override var nick: String?

Gets this member guild nickname.

Link copied to clipboard
open override var pending: Boolean

Whether the user has not yet passed the guild's Membership Screening requirements.

Link copied to clipboard
open override val permissions: EnumSet<GuildPermission>

The permissions of this member.

Link copied to clipboard
open override var premiumSince: String?

The date the member started boosting the guild.

Link copied to clipboard
open override val roleIds: List<GetterSnowFlake>

The ids of the roles this member is assigned.

Link copied to clipboard
open override val roles: List<Role?>

The roles of this member.

Link copied to clipboard
open override var timedOutUntil: String?

If the member is timed out, then this is the time at which the timeout will end.

Link copied to clipboard
open override var user: User

The user this guild member represents.

Link copied to clipboard
open override var voiceState: VoiceState?

If the member is in avc it will get there voice state.

Link copied to clipboard
open override val yde: YDEImpl

The main YDE instance.