BotImpl

class BotImpl(val json: JsonNode, id: Long, val yde: YDE) : UserImpl, Bot(source)

Constructors

Link copied to clipboard
constructor(json: JsonNode, id: Long, yde: YDE)

Functions

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
fun getAvatar(yde: YDE, discriminator: String, avatarHash: String?, size: Int?): Avatar
Link copied to clipboard
open override fun guildAvatar(guildId: Long): Avatar?

The user's guild specific avatar.

Link copied to clipboard
open override fun guildAvatarHash(guildId: Long): String?

The user's guild specific avatar hash.

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 override var accentColor: Color?

The user's banner color encoded as an integer representation of hexadecimal color code.

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 override val avatar: Avatar

The user's avatar.

Link copied to clipboard
open override var avatarHash: String?

The user's avatar hash.

Link copied to clipboard
open override var banner: String?

The user's banner hash.

Link copied to clipboard
open override val bot: Boolean

Whether the user belongs to an OAuth2 application.

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

Creates a dm channel with this user.

Link copied to clipboard
open override var discriminator: String

The user's 4-digit discord-tag.

Link copied to clipboard
open override var email: String

The user's email.

Link copied to clipboard
open override var flags: Int?

The flags on a user's account.

Link copied to clipboard
open override var globalName: String

The global name of the user.

Link copied to clipboard
open override val hasDefaultAvatar: Boolean

Whether the user has a default avatar.

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
override val json: JsonNode

The json representation of this entity.

Link copied to clipboard
open override var locale: String?

The user's chosen language option.

Link copied to clipboard

The actual message builder instance.

Link copied to clipboard
open override var mfaEnabled: Boolean?

Whether the user has two factor enabled on their account.

Link copied to clipboard
open override var name: String
Link copied to clipboard
open override var publicFlags: Int?

The public flags on a user's account.

Link copied to clipboard
open override var system: Boolean?

Whether the user is an Official Discord System user (part of the urgent message system).

Link copied to clipboard
open override var verified: Boolean?

Whether the email on this account has been verified.

Link copied to clipboard
open override val yde: YDE

The main YDE instance.