YDEImpl

open class YDEImpl(token: String? = null, var applicationId: String? = null, client: OkHttpClient, guildIdList: MutableList<String> = mutableListOf(), val githubRepositoryUrl: String, val wrapperVersion: String) : YDE(source)

Constructors

Link copied to clipboard
constructor(token: String? = null, applicationId: String? = null, client: OkHttpClient, guildIdList: MutableList<String> = mutableListOf(), githubRepositoryUrl: String, wrapperVersion: String)

Functions

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

Creates a dm channel.

Link copied to clipboard
open fun getChannelById(id: String): Channel?
open override fun getChannelById(id: Long): Channel?

Gets a channel by its id.

Link copied to clipboard
open override fun getChannels(): List<Channel>

Gets all the channels the bot can see.

Link copied to clipboard
open fun getGuildById(id: Long): Guild?
open override fun getGuildById(id: String): Guild?

Gets a guild by its id.

Link copied to clipboard

Gets a guild channel by its id.

Link copied to clipboard

Gets guild channels by their ids.

Link copied to clipboard

Gets all the guild channels the bot can see.

Link copied to clipboard
open override fun getGuilds(): List<Guild>

Gets all the guilds the bot is in.

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

Gets a member by its id.

Link copied to clipboard
open override fun getMembers(): List<Member>

Gets all the members in all the guilds the bot is in.

Link copied to clipboard
open fun getUserById(id: String): User?
open override fun getUserById(id: Long): User?

Gets a user by its id.

Link copied to clipboard
open override fun getUsers(): List<User>

Gets all the users the bot can see.

Link copied to clipboard
open fun requestChannelById(id: Long): CompletableDeferred<Channel>
open fun requestChannelById(id: String): CompletableDeferred<Channel>

Requests a channel using its id.

Link copied to clipboard
open fun requestGuild(guildId: Long): CompletableDeferred<Guild>
open fun requestGuild(guildId: String): CompletableDeferred<Guild>

Requests a guild using its id.

Link copied to clipboard
open fun requestGuildChannelById(id: Long, guildId: Long): CompletableDeferred<GuildChannel>
open fun requestGuildChannelById(id: String, guildId: String): CompletableDeferred<GuildChannel>

Requests a guild channel using its id.

Link copied to clipboard
open fun requestGuildChannels(guildId: Long): CompletableDeferred<List<GuildChannel>>
open fun requestGuildChannels(guildId: String): CompletableDeferred<List<GuildChannel>>

Requests a list of guild channels by the guild id.

Link copied to clipboard
open fun requestGuilds(): CompletableDeferred<List<Guild>>

Requests all the guilds the bot is in.

Link copied to clipboard
open fun requestUser(id: Long): CompletableDeferred<User>
open fun requestUser(id: String): CompletableDeferred<User>

Requests a user using its id.

Link copied to clipboard
open fun requestUsers(): CompletableDeferred<List<User>>

Requests all the users the bot can see.

Link copied to clipboard
open fun setAllowedCache(cacheIds: MutableList<CacheIds>)
open override fun setAllowedCache(vararg cacheIds: CacheIds)

Sets the allowed cache ids.

Link copied to clipboard
open override fun setDisallowedCache(vararg cacheIds: CacheIds)

Sets the disallowed cache ids.

Link copied to clipboard
open fun setGuildIds(vararg guildIds: Long)
open fun setGuildIds(guildIds: MutableList<String>)
open override fun setGuildIds(vararg guildIds: String)

Sets the guild ids for guild commands

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

Overrides the custom to string method.

Link copied to clipboard
open fun triggerCacheClear(duration: Long, repeat: Boolean = true)
open override fun triggerCacheClear(duration: Duration, repeat: Boolean)

Triggers a thread to clear the entire cache after a certain amount of time

Link copied to clipboard
open fun triggerCacheTypeClear(cacheId: CacheIds, duration: Long, repeat: Boolean = true)
open override fun triggerCacheTypeClear(cacheId: CacheIds, duration: Duration, repeat: Boolean)

Triggers a thread to clear a certain cache type after a certain amount of time

open fun triggerCacheTypeClear(cacheIds: List<CacheIds>, duration: Long, repeat: Boolean = true)
open override fun triggerCacheTypeClear(cacheIds: List<CacheIds>, duration: Duration, repeat: Boolean)

Triggers a thread to clear a list of cache types after a certain amount of time

Properties

Link copied to clipboard
Link copied to clipboard
open override val bot: Bot? = null

The properties of the bot.

Link copied to clipboard
Link copied to clipboard
open override val embedBuilder: EmbedBuilder

Used to build embeds.

Link copied to clipboard
open override val entityBuilder: EntityBuilder

The entity builder.

Link copied to clipboard
open override val githubRepositoryUrl: String

The github repository url.

Link copied to clipboard
val logger: Logger
Link copied to clipboard
Link copied to clipboard

Adds or removes message commands.

Link copied to clipboard
open override val objectMapper: ObjectMapper

Parses json, i.e. convert plain text json to Jackson classes such as JsonNode.

Link copied to clipboard
open override val objectNode: ObjectNode

Creates a json object

Link copied to clipboard
open override val restApiManager: RestApiManager

The rest api manager.

Link copied to clipboard
open override val restAPIMethodGetters: RestAPIMethodGetters

The place where all the RestAPI Methods are stored.

Link copied to clipboard

Adds or removes slash commands.

Link copied to clipboard
open override val threadFactory: ThreadFactory

The thread factory used by the bot.

Link copied to clipboard

Adds or removes user commands.

Link copied to clipboard
open override val wrapperVersion: String

The wrapper version.