Guild

This class is used to represent a discord guild object.

Inheritors

Functions

Link copied to clipboard
open fun banMember(member: Member, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>

Bans a member from the guild.

Link copied to clipboard
open fun banUser(userId: Long, reason: String? = null): CompletableDeferred<NoResult>
open fun banUser(userId: String, reason: String? = null): CompletableDeferred<NoResult>
open fun banUser(user: User, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>
open fun banUser(userId: Long, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>
open fun banUser(userId: String, deleteMessageDuration: Duration = Duration.ZERO, reason: String? = null): CompletableDeferred<NoResult>

Bans a user from the guild.

Link copied to clipboard
open fun createDmChannel(user: User): CompletableDeferred<DmChannel>
open fun createDmChannel(userId: String): CompletableDeferred<DmChannel>

Creates a dm channel.

open fun createDmChannel(userId: Long): CompletableDeferred<DmChannel>

Creates a dm channel..

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
abstract fun getChannelById(channelId: Long): GuildChannel?
open fun getChannelById(channelId: String): GuildChannel?

The channel by its id.

Link copied to clipboard

The channel getter by its id.

Link copied to clipboard
open fun getMemberById(userId: Long): Member?
open fun getMemberById(userId: String): Member?

The member by its user id.

Link copied to clipboard
abstract fun getRoleById(roleId: Long): Role?
open fun getRoleById(roleId: String): Role?

Gets a role from the guild.

Link copied to clipboard
open fun kickMember(member: Member, reason: String? = null): CompletableDeferred<NoResult>
open fun kickMember(userId: Long, reason: String? = null): CompletableDeferred<NoResult>
open fun kickMember(userId: String, reason: String? = null): CompletableDeferred<NoResult>

Kicks a member from the guild.

Link copied to clipboard
open fun requestedAuditLog(): CompletableDeferred<AuditLog>
open fun requestedAuditLog(user: User): CompletableDeferred<AuditLog>
open fun requestedAuditLog(userId: GetterSnowFlake): CompletableDeferred<AuditLog>
open fun requestedAuditLog(user: User, limit: Int): CompletableDeferred<AuditLog>
open fun requestedAuditLog(userId: GetterSnowFlake, limit: Int): CompletableDeferred<AuditLog>
open fun requestedAuditLog(user: User, limit: Int, before: GetterSnowFlake): CompletableDeferred<AuditLog>
open fun requestedAuditLog(userId: GetterSnowFlake, limit: Int, before: GetterSnowFlake): CompletableDeferred<AuditLog>
open fun requestedAuditLog(user: User? = null, limit: Int = 50, before: GetterSnowFlake? = null, actionType: AuditLogType? = null): CompletableDeferred<AuditLog>
open fun requestedAuditLog(userId: GetterSnowFlake? = null, limit: Int = 50, before: GetterSnowFlake? = null, actionType: AuditLogType? = null): CompletableDeferred<AuditLog>

Request the audit log for the guild.

Link copied to clipboard
open fun retrieveMembers(limit: Int): CompletableDeferred<List<Member>>

Gets all the members of the guild.

Link copied to clipboard
open fun unbanUser(user: User, reason: String? = null): CompletableDeferred<NoResult>
open fun unbanUser(userId: Long, reason: String? = null): CompletableDeferred<NoResult>
open fun unbanUser(userId: String, reason: String? = null): CompletableDeferred<NoResult>

Unbans a user from the guild.

Properties

Link copied to clipboard

The guild's afk channel id.

Link copied to clipboard
abstract var afkTimeout: Int

The guild's afk timeout.

Link copied to clipboard

The guild's application id.

Link copied to clipboard

The approximate member count for the guild.

Link copied to clipboard

The approximate presence count for the guild.

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
abstract var banner: String?

The banner hash for the guild.

Link copied to clipboard
abstract val botAsMember: Member

The bot as a member of the guild.

Link copied to clipboard

The guild's default message notification level.

Link copied to clipboard
abstract var description: String?

The description for the guild.

Link copied to clipboard
abstract var discoverySplash: String?

The guild's discovery splash hash.

Link copied to clipboard
abstract var emojis: List<Emoji>

The guild's emojis.

Link copied to clipboard
open val everyoneRole: Role

The @everyone role. This role is always present.

Link copied to clipboard

The guild's explicit content filter level.

Link copied to clipboard
abstract var features: Set<GuildFeature>

The guild's features.

Link copied to clipboard

Gets all the categories as sorted list.

Link copied to clipboard

Gets all the channels as sorted list.

Link copied to clipboard

Gets all the text channels as sorted list.

Link copied to clipboard

Gets all the channels as unordered list.

Link copied to clipboard

Gets all the voice channels as sorted list.

Link copied to clipboard
abstract var icon: String?

The guild's icon hash.

Link copied to clipboard
open val id: String

The id of this snowflake as a String.

Link copied to clipboard
abstract val idAsLong: Long

The id of this snowflake as a Long.

Link copied to clipboard

Gets weather the guild has the boost progress bar enabled.

Link copied to clipboard
abstract var isOwner: Boolean?

Checks if this is user is owner of the guild.

Link copied to clipboard
abstract var isWidgetEnabled: Boolean?

Checks if the guild's widget is enabled.

Link copied to clipboard
abstract val json: JsonNode

The json representation of this entity.

Link copied to clipboard
abstract var maxMembers: Int

The maximum number of members for the guild.

Link copied to clipboard
abstract var maxPresences: Int?

The maximum number of presences for the guild (null is always returned, apart from the largest of guilds).

Link copied to clipboard
abstract var maxVideoChannelUsers: Int?

The maximum amount of users in a video channel.

Link copied to clipboard
abstract var mfaLevel: MFALevel

The guild's mfa level.

Link copied to clipboard
abstract var name: String
Link copied to clipboard
abstract var nsfwLevel: NSFWLeveL

The guild's nsfw level.

Link copied to clipboard
abstract var ownerId: GetterSnowFlake

The guild's owner id.

Link copied to clipboard
abstract var permissions: String?

The guild's permissions.

Link copied to clipboard
abstract var preferredLocale: String

The preferred locale for the guild.

Link copied to clipboard

The premium subscription count for the guild.

Link copied to clipboard
abstract var premiumTier: PremiumTier

The premium tier for the guild.

Link copied to clipboard

The public updates channel id for the guild.

Link copied to clipboard
open val requestBans: CompletableDeferred<List<Ban>>

Requests a list of ban's for the guild.

Link copied to clipboard
open val retrieveMembers: CompletableDeferred<List<Member>>

Gets all the members of the guild.

Link copied to clipboard
abstract var roles: List<Role>

The guild's roles.

Link copied to clipboard

The guild's rules channel id.

Link copied to clipboard
abstract var splash: String?

The guild's splash hash.

Link copied to clipboard
abstract var stickers: List<Sticker>

The guild's custom stickers.

Link copied to clipboard

The guild's system channel flags.

Link copied to clipboard

The guild's system channel id.

Link copied to clipboard
abstract var vanityUrlCode: String?

The vanity url code for the guild.

Link copied to clipboard

The guild's verification level.

Link copied to clipboard
abstract val voiceStates: List<VoiceState>

All the current voice states for the guild.

Link copied to clipboard

The welcome screen of the guild.

Link copied to clipboard

The guild's widget channel id.

Link copied to clipboard
abstract val yde: YDE

The main YDE instance.