public interface JDA
Modifier and Type | Interface | Description |
---|---|---|
static class |
JDA.ShardInfo |
Represents the information used to create this shard.
|
static class |
JDA.Status |
Represents the connection status of JDA and its Main WebSocket.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addEventListener(java.lang.Object... listeners) |
Adds all provided listeners to the event-listeners that will be used to handle events.
|
JDABot |
asBot() |
Used to access Bot specific functions like OAuth information.
|
JDAClient |
asClient() |
Used to access Client specific functions like Groups, Calls, and Friends.
|
default JDA |
awaitReady() |
This method will block until JDA has reached the status
JDA.Status.CONNECTED . |
JDA |
awaitStatus(JDA.Status status) |
This method will block until JDA has reached the specified connection status.
|
GuildAction |
createGuild(java.lang.String name) |
Constructs a new
Guild with the specified name
Use the returned GuildAction to provide
further details and settings for the resulting Guild! |
AccountType |
getAccountType() |
The
AccountType of the currently logged in account. |
CacheView<AudioManager> |
getAudioManagerCache() |
CacheView of
all cached AudioManagers created for this JDA instance. |
default java.util.List<AudioManager> |
getAudioManagers() |
Immutable list of all created
AudioManagers for this JDA instance! |
default java.util.List<Category> |
getCategories() |
Gets all
Categories visible to the currently logged in account. |
default java.util.List<Category> |
getCategoriesByName(java.lang.String name,
boolean ignoreCase) |
Gets a list of all
Categories that have the same name as the one
provided. |
default Category |
getCategoryById(long id) |
Gets the
Category that matches the provided id. |
default Category |
getCategoryById(java.lang.String id) |
Gets the
Category that matches the provided id. |
SnowflakeCacheView<Category> |
getCategoryCache() |
SnowflakeCacheView of
all cached Categories visible to this JDA session. |
java.util.List<java.lang.String> |
getCloudflareRays() |
Contains all
cf-ray headers that JDA received in this session. |
default Emote |
getEmoteById(long id) |
Retrieves an emote matching the specified
id if one is available in our cache. |
default Emote |
getEmoteById(java.lang.String id) |
Retrieves an emote matching the specified
id if one is available in our cache. |
SnowflakeCacheView<Emote> |
getEmoteCache() |
Unified
SnowflakeCacheView of
all cached Emotes visible to this JDA session. |
default java.util.List<Emote> |
getEmotes() |
A collection of all to us known emotes (managed/restricted included).
|
default java.util.List<Emote> |
getEmotesByName(java.lang.String name,
boolean ignoreCase) |
An unmodifiable list of all
Emotes that have the same name as the one
provided. |
IEventManager |
getEventManager() |
The EventManager used by this JDA instance.
|
default Guild |
getGuildById(long id) |
This returns the
Guild which has the same id as the one provided. |
default Guild |
getGuildById(java.lang.String id) |
This returns the
Guild which has the same id as the one provided. |
SnowflakeCacheView<Guild> |
getGuildCache() |
SnowflakeCacheView of
all cached Guilds visible to this JDA session. |
default java.util.List<Guild> |
getGuilds() |
An unmodifiable List of all
Guilds that the logged account is connected to. |
default java.util.List<Guild> |
getGuildsByName(java.lang.String name,
boolean ignoreCase) |
An unmodifiable list of all
Guilds that have the same name as the one provided. |
int |
getMaxReconnectDelay() |
This value is the maximum amount of time, in seconds, that JDA will wait between reconnect attempts.
|
java.util.List<Guild> |
getMutualGuilds(java.util.Collection<User> users) |
Gets all
Guilds that contain all given users as their members. |
java.util.List<Guild> |
getMutualGuilds(User... users) |
Gets all
Guilds that contain all given users as their members. |
long |
getPing() |
The time in milliseconds that discord took to respond to our last heartbeat
This roughly represents the WebSocket ping of this session |
Presence |
getPresence() |
The
Presence controller for the current session. |
default PrivateChannel |
getPrivateChannelById(long id) |
This returns the
PrivateChannel which has the same id as the one provided. |
default PrivateChannel |
getPrivateChannelById(java.lang.String id) |
This returns the
PrivateChannel which has the same id as the one provided. |
SnowflakeCacheView<PrivateChannel> |
getPrivateChannelCache() |
SnowflakeCacheView of
all cached PrivateChannels visible to this JDA session. |
default java.util.List<PrivateChannel> |
getPrivateChannels() |
An unmodifiable list of all known
PrivateChannels . |
java.util.List<java.lang.Object> |
getRegisteredListeners() |
Returns an unmodifiable List of Objects that have been registered as EventListeners.
|
long |
getResponseTotal() |
This value is the total amount of JSON responses that discord has sent.
|
default Role |
getRoleById(long id) |
Retrieves the
Role associated to the provided id. |
default Role |
getRoleById(java.lang.String id) |
Retrieves the
Role associated to the provided id. |
SnowflakeCacheView<Role> |
getRoleCache() |
Unified
SnowflakeCacheView of
all cached Roles visible to this JDA session. |
default java.util.List<Role> |
getRoles() |
All
Roles this JDA instance can see. |
default java.util.List<Role> |
getRolesByName(java.lang.String name,
boolean ignoreCase) |
Retrieves all
Roles visible to this JDA instance. |
SelfUser |
getSelfUser() |
Returns the currently logged in account represented by
SelfUser . |
JDA.ShardInfo |
getShardInfo() |
The shard information used when creating this instance of JDA.
|
JDA.Status |
getStatus() |
Gets the current
Status of the JDA instance. |
default TextChannel |
getTextChannelById(long id) |
This returns the
TextChannel which has the same id as the one provided. |
default TextChannel |
getTextChannelById(java.lang.String id) |
This returns the
TextChannel which has the same id as the one provided. |
SnowflakeCacheView<TextChannel> |
getTextChannelCache() |
SnowflakeCacheView of
all cached TextChannels visible to this JDA session. |
default java.util.List<TextChannel> |
getTextChannels() |
An unmodifiable List of all
TextChannels of all connected
Guilds . |
default java.util.List<TextChannel> |
getTextChannelsByName(java.lang.String name,
boolean ignoreCase) |
An unmodifiable list of all
TextChannels that have the same name as the one provided. |
java.lang.String |
getToken() |
The login token that is currently being used for Discord authentication.
|
default User |
getUserById(long id) |
This returns the
User which has the same id as the one provided. |
default User |
getUserById(java.lang.String id) |
This returns the
User which has the same id as the one provided. |
SnowflakeCacheView<User> |
getUserCache() |
SnowflakeCacheView of
all cached Users visible to this JDA session. |
default java.util.List<User> |
getUsers() |
|
default java.util.List<User> |
getUsersByName(java.lang.String name,
boolean ignoreCase) |
This unmodifiable returns all
Users that have the same username as the one provided. |
default VoiceChannel |
getVoiceChannelById(long id) |
This returns the
VoiceChannel which has the same id as the one provided. |
default VoiceChannel |
getVoiceChannelById(java.lang.String id) |
This returns the
VoiceChannel which has the same id as the one provided. |
default java.util.List<VoiceChannel> |
getVoiceChannelByName(java.lang.String name,
boolean ignoreCase) |
An unmodifiable list of all
VoiceChannels that have the same name as the one provided. |
SnowflakeCacheView<VoiceChannel> |
getVoiceChannelCache() |
SnowflakeCacheView of
all cached VoiceChannels visible to this JDA session. |
default java.util.List<VoiceChannel> |
getVoiceChannels() |
An unmodifiable list of all
VoiceChannels of all connected
Guilds . |
default RestAction<Webhook> |
getWebhookById(long webhookId) |
Retrieves a
Webhook by its id. |
RestAction<Webhook> |
getWebhookById(java.lang.String webhookId) |
Retrieves a
Webhook by its id. |
java.util.List<java.lang.String> |
getWebSocketTrace() |
Receives all valid
_trace lines that have been sent to us
in this session. |
boolean |
isAudioEnabled() |
Used to determine whether the instance of JDA supports audio and has it enabled.
|
boolean |
isAutoReconnect() |
USed to determine whether or not autoReconnect is enabled for JDA.
|
boolean |
isBulkDeleteSplittingEnabled() |
Used to determine if JDA will process MESSAGE_DELETE_BULK messages received from Discord as a single
MessageBulkDeleteEvent or split
the deleted messages up and fire multiple MessageDeleteEvents ,
one for each deleted message. |
void |
removeEventListener(java.lang.Object... listeners) |
Removes all provided listeners from the event-listeners and no longer uses them to handle events.
|
RestAction<User> |
retrieveUserById(long id) |
Attempts to retrieve a
User object based on the provided id. |
RestAction<User> |
retrieveUserById(java.lang.String id) |
Attempts to retrieve a
User object based on the provided id. |
void |
setAutoReconnect(boolean reconnect) |
Sets whether or not JDA should try to automatically reconnect if a connection-error is encountered.
|
void |
setEventManager(IEventManager manager) |
Changes the internal EventManager.
|
void |
setRequestTimeoutRetry(boolean retryOnTimeout) |
Whether the Requester should retry when
a
SocketTimeoutException occurs. |
void |
shutdown() |
Shuts down this JDA instance, closing all its connections.
|
void |
shutdownNow() |
Shuts down this JDA instance instantly, closing all its connections.
|
JDA.Status getStatus()
Status
of the JDA instance.long getPing()
RestAction
request times do not
correlate to this value!
JDA awaitStatus(JDA.Status status) throws java.lang.InterruptedException
status
- The init status to wait for, once JDA has reached the specified
stage of the startup cycle this method will return.java.lang.InterruptedException
- If this thread is interrupted while waitingjava.lang.IllegalArgumentException
- If the provided status is null or not an init status (JDA.Status.isInit()
)java.lang.IllegalStateException
- If JDA is shutdown during this wait perioddefault JDA awaitReady() throws java.lang.InterruptedException
JDA.Status.CONNECTED
.
java.lang.InterruptedException
- If this thread is interrupted while waitingjava.lang.IllegalStateException
- If JDA is shutdown during this wait periodjava.util.List<java.lang.String> getCloudflareRays()
cf-ray
headers that JDA received in this session.
This is useful to monitor cloudflare activity from the Discord Developer perspective.
Use this list to report connection issues.
java.util.List<java.lang.String> getWebSocketTrace()
_trace
lines that have been sent to us
in this session.
void setEventManager(IEventManager manager)
The default EventManager is InterfacedEventListener
.
There is also an AnnotatedEventManager
available.
manager
- The new EventManager to usevoid addEventListener(java.lang.Object... listeners)
InterfacedEventListener
by default.
To switch to the AnnotatedEventManager
, use setEventManager(IEventManager)
.
Note: when using the InterfacedEventListener
(default),
given listener must be instance of EventListener
!listeners
- The listener(s) which will react to events.java.lang.IllegalArgumentException
- If either listeners or one of it's objects is null
.void removeEventListener(java.lang.Object... listeners)
listeners
- The listener(s) to be removed.java.lang.IllegalArgumentException
- If either listeners or one of it's objects is null
.java.util.List<java.lang.Object> getRegisteredListeners()
GuildAction createGuild(java.lang.String name)
Guild
with the specified name
GuildAction
to provide
further details and settings for the resulting Guild!
This RestAction does not provide the resulting Guild!
It will be in a following GuildJoinEvent
.
name
- The name of the resulting guildGuildAction
java.lang.IllegalStateException
- If the currently logged in account is from
AccountType.CLIENT
and the account is in 100 or more guildsAccountType.BOT
and the account is in 10 or more guildsjava.lang.IllegalArgumentException
- If the provided name is empty, null
or not between 2-100 charactersCacheView<AudioManager> getAudioManagerCache()
CacheView
of
all cached AudioManagers
created for this JDA instance.
Guild.getAudioManager()
.
Using this will perform better than calling Guild.getAudioManager()
iteratively as that would cause many useless audio managers to be created!
AudioManagers are cross-session persistent!
CacheView
default java.util.List<AudioManager> getAudioManagers()
AudioManagers
for this JDA instance!SnowflakeCacheView<User> getUserCache()
SnowflakeCacheView
of
all cached Users
visible to this JDA session.SnowflakeCacheView
default java.util.List<User> getUsers()
Users
that share a
Guild
with the currently logged in account.
Users
that JDA can currently see.
If the developer is sharding, then only users from guilds connected to the specifically logged in shard will be returned in the List.
Users
that are visible to JDA.default User getUserById(java.lang.String id)
User
which has the same id as the one provided.
null
.default User getUserById(long id)
User
which has the same id as the one provided.
null
.default java.util.List<User> getUsersByName(java.lang.String name, boolean ignoreCase)
Users
that have the same username as the one provided.
Users
with the provided name, then this returns an empty list.
Note: This does **not** consider nicknames, it only considers User.getName()
name
- The name of the requested Users
.ignoreCase
- Whether to ignore case or not when comparing the provided name to each User.getName()
.Users
that all have the same name as the provided name.java.util.List<Guild> getMutualGuilds(User... users)
Guilds
that contain all given users as their members.java.util.List<Guild> getMutualGuilds(java.util.Collection<User> users)
Guilds
that contain all given users as their members.@CheckReturnValue RestAction<User> retrieveUserById(java.lang.String id)
User
object based on the provided id.
getUserById(long)
, and if the return is null
then a request
is made to the Discord servers.
The returned RestAction
can encounter the following Discord errors:
ErrorResponse.UNKNOWN_USER
User
known by Discord. Typically occurs when developers provide an incomplete id (cut short).id
- The id of the requested User
.RestAction
- Type: User
AccountTypeException
- This endpoint is AccountType.BOT
only.java.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
java.lang.IllegalArgumentException
- @CheckReturnValue RestAction<User> retrieveUserById(long id)
User
object based on the provided id.
getUserById(long)
, and if the return is null
then a request
is made to the Discord servers.
The returned RestAction
can encounter the following Discord errors:
ErrorResponse.UNKNOWN_USER
User
known by Discord. Typically occurs when developers provide an incomplete id (cut short).id
- The id of the requested User
.RestAction
- Type: User
AccountTypeException
- This endpoint is AccountType.BOT
only.SnowflakeCacheView<Guild> getGuildCache()
SnowflakeCacheView
of
all cached Guilds
visible to this JDA session.SnowflakeCacheView
default java.util.List<Guild> getGuilds()
Guilds
that the logged account is connected to.
Guilds
, this will return an empty list.
If the developer is sharding (JDABuilder.useSharding(int, int)
, then this list
will only contain the Guilds
that the shard is actually connected to.
Discord determines which guilds a shard is connect to using the following format:
Guild connected if shardId == (guildId >> 22) % totalShards;
Source for formula: Discord Documentation
Guilds
that this account is connected to.default Guild getGuildById(java.lang.String id)
Guild
which has the same id as the one provided.
null
.default Guild getGuildById(long id)
Guild
which has the same id as the one provided.
null
.default java.util.List<Guild> getGuildsByName(java.lang.String name, boolean ignoreCase)
Guilds
that have the same name as the one provided.
Guilds
with the provided name, then this returns an empty list.name
- The name of the requested Guilds
.ignoreCase
- Whether to ignore case or not when comparing the provided name to each Guild.getName()
.Guilds
that all have the same name as the provided name.SnowflakeCacheView<Role> getRoleCache()
SnowflakeCacheView
of
all cached Roles
visible to this JDA session.SnowflakeCacheView
CacheView.allSnowflakes(...)
default java.util.List<Role> getRoles()
Roles
this JDA instance can see. Guild
retrieved from getGuilds()
and collect its Guild.getRoles()
.default Role getRoleById(java.lang.String id)
Role
associated to the provided id. Guilds
and check whether a Role from that Guild is assigned
to the specified ID and will return the first that can be found.id
- The id of the searched RoleRole
for the specified IDjava.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
default Role getRoleById(long id)
Role
associated to the provided id. Guilds
and check whether a Role from that Guild is assigned
to the specified ID and will return the first that can be found.id
- The id of the searched RoleRole
for the specified IDdefault java.util.List<Role> getRolesByName(java.lang.String name, boolean ignoreCase)
Roles
visible to this JDA instance.
getRoles()
with the provided name, either using
String.equals(Object)
or String.equalsIgnoreCase(String)
on Role.getName()
.name
- The name for the RolesignoreCase
- Whether to use String.equalsIgnoreCase(String)
SnowflakeCacheView<Category> getCategoryCache()
SnowflakeCacheView
of
all cached Categories
visible to this JDA session.SnowflakeCacheView
default Category getCategoryById(java.lang.String id)
id
- The snowflake ID of the wanted CategoryCategory
for the provided ID.java.lang.IllegalArgumentException
- If the provided ID is not a valid long
default Category getCategoryById(long id)
id
- The snowflake ID of the wanted CategoryCategory
for the provided ID.default java.util.List<Category> getCategories()
Categories
visible to the currently logged in account.Categories
.default java.util.List<Category> getCategoriesByName(java.lang.String name, boolean ignoreCase)
Categories
that have the same name as the one
provided. name
- The name to checkignoreCase
- Whether to ignore case on name checkingjava.lang.IllegalArgumentException
- If the provided name is null
SnowflakeCacheView<TextChannel> getTextChannelCache()
SnowflakeCacheView
of
all cached TextChannels
visible to this JDA session.SnowflakeCacheView
default java.util.List<TextChannel> getTextChannels()
TextChannels
of all connected
Guilds
.
Note: just because a TextChannel
is present in this list does
not mean that you will be able to send messages to it. Furthermore, if you log into this account on the discord
client, it is possible that you will see fewer channels than this returns. This is because the discord
client hides any TextChannel
that you don't have the
Permission.MESSAGE_READ
permission in.
TextChannels
.default TextChannel getTextChannelById(java.lang.String id)
TextChannel
which has the same id as the one provided.
TextChannel
with an id that matches the
provided one, then this returns null
.
Note: just because a TextChannel
is present does
not mean that you will be able to send messages to it. Furthermore, if you log into this account on the discord
client, it is you will not see the channel that this returns. This is because the discord client
hides any TextChannel
that you don't have the
Permission.MESSAGE_READ
permission in.
id
- The id of the TextChannel
.TextChannel
with matching id.java.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
default TextChannel getTextChannelById(long id)
TextChannel
which has the same id as the one provided.
TextChannel
with an id that matches the
provided one, then this returns null
.
Note: just because a TextChannel
is present does
not mean that you will be able to send messages to it. Furthermore, if you log into this account on the discord
client, it is you will not see the channel that this returns. This is because the discord client
hides any TextChannel
that you don't have the
Permission.MESSAGE_READ
permission in.
id
- The id of the TextChannel
.TextChannel
with matching id.default java.util.List<TextChannel> getTextChannelsByName(java.lang.String name, boolean ignoreCase)
TextChannels
that have the same name as the one provided.
TextChannels
with the provided name, then this returns an empty list.
Note: just because a TextChannel
is present in this list does
not mean that you will be able to send messages to it. Furthermore, if you log into this account on the discord
client, it is possible that you will see fewer channels than this returns. This is because the discord client
hides any TextChannel
that you don't have the
Permission.MESSAGE_READ
permission in.
name
- The name of the requested TextChannels
.ignoreCase
- Whether to ignore case or not when comparing the provided name to each Channel.getName()
.TextChannels
that all have the
same name as the provided name.SnowflakeCacheView<VoiceChannel> getVoiceChannelCache()
SnowflakeCacheView
of
all cached VoiceChannels
visible to this JDA session.SnowflakeCacheView
default java.util.List<VoiceChannel> getVoiceChannels()
VoiceChannels
of all connected
Guilds
.VoiceChannels
.default VoiceChannel getVoiceChannelById(java.lang.String id)
VoiceChannel
which has the same id as the one provided.
VoiceChannel
with an id that matches the provided
one, then this returns null
.id
- The id of the VoiceChannel
.VoiceChannel
with matching id.java.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
default VoiceChannel getVoiceChannelById(long id)
VoiceChannel
which has the same id as the one provided.
VoiceChannel
with an id that matches the provided
one, then this returns null
.id
- The id of the VoiceChannel
.VoiceChannel
with matching id.default java.util.List<VoiceChannel> getVoiceChannelByName(java.lang.String name, boolean ignoreCase)
VoiceChannels
that have the same name as the one provided.
VoiceChannels
with the provided name, then this returns an empty list.name
- The name of the requested VoiceChannels
.ignoreCase
- Whether to ignore case or not when comparing the provided name to each Channel.getName()
.VoiceChannels
that all have the
same name as the provided name.SnowflakeCacheView<PrivateChannel> getPrivateChannelCache()
SnowflakeCacheView
of
all cached PrivateChannels
visible to this JDA session.SnowflakeCacheView
default java.util.List<PrivateChannel> getPrivateChannels()
PrivateChannels
.PrivateChannels
.default PrivateChannel getPrivateChannelById(java.lang.String id)
PrivateChannel
which has the same id as the one provided.
PrivateChannel
with an id that matches the provided
one, then this returns null
.id
- The id of the PrivateChannel
.PrivateChannel
with matching id.java.lang.NumberFormatException
- If the provided id
cannot be parsed by Long.parseLong(String)
default PrivateChannel getPrivateChannelById(long id)
PrivateChannel
which has the same id as the one provided.
PrivateChannel
with an id that matches the provided
one, then this returns null
.id
- The id of the PrivateChannel
.PrivateChannel
with matching id.SnowflakeCacheView<Emote> getEmoteCache()
SnowflakeCacheView
of
all cached Emotes
visible to this JDA session.SnowflakeCacheView
CacheView.allSnowflakes(...)
default java.util.List<Emote> getEmotes()
CacheFlag.EMOTE
is disabled.
Hint: To check whether you can use an Emote
in a specific
context you can use Emote.canInteract(net.dv8tion.jda.core.entities.Member)
or Emote.canInteract(net.dv8tion.jda.core.entities.User, net.dv8tion.jda.core.entities.MessageChannel)
Unicode emojis are not included as Emote
!
default Emote getEmoteById(java.lang.String id)
id
if one is available in our cache.
CacheFlag.EMOTE
is disabled.
Unicode emojis are not included as Emote
!
default Emote getEmoteById(long id)
id
if one is available in our cache.
CacheFlag.EMOTE
is disabled.
Unicode emojis are not included as Emote
!
default java.util.List<Emote> getEmotesByName(java.lang.String name, boolean ignoreCase)
Emotes
that have the same name as the one
provided. Emotes
with the provided name, then
this returns an empty list.
CacheFlag.EMOTE
is disabled.
Unicode emojis are not included as Emote
!
name
- The name of the requested Emotes
.ignoreCase
- Whether to ignore case or not when comparing the provided name to each Emote.getName()
.Emotes
that all have the same
name as the provided name.IEventManager getEventManager()
IEventManager
SelfUser getSelfUser()
SelfUser
.
SelfUser.getManager()
.JDA.ShardInfo getShardInfo()
JDABuilder.useSharding(int, int)
.null
if this JDA instance isn't sharding.java.lang.String getToken()
long getResponseTotal()
int getMaxReconnectDelay()
JDABuilder.setMaxReconnectDelay(int)
.void setAutoReconnect(boolean reconnect)
Default is true.
reconnect
- If true - enables autoReconnectvoid setRequestTimeoutRetry(boolean retryOnTimeout)
SocketTimeoutException
occurs.retryOnTimeout
- True, if the Request should retry once on a socket timeoutboolean isAutoReconnect()
boolean isAudioEnabled()
boolean isBulkDeleteSplittingEnabled()
MessageBulkDeleteEvent
or split
the deleted messages up and fire multiple MessageDeleteEvents
,
one for each deleted message.
By default, JDA will separate the bulk delete event into individual delete events, but this isn't as efficient as
handling a single event would be. It is recommended that BulkDelete Splitting be disabled and that the developer
should instead handle the MessageBulkDeleteEvent
void shutdown()
RestActions
are still going to be executed.
If you want this instance to shutdown without executing, use shutdownNow()
shutdownNow()
void shutdownNow()
RestActions
.
If you want this instance to shutdown without cancelling enqueued RestActions use shutdown()
shutdown()
AccountType getAccountType()
AccountType
of the currently logged in account.
JDAClient asClient()
JDAClient
registry for this instance of JDA.AccountTypeException
- Thrown if the currently logged in account is AccountType.BOT
JDABot asBot()
JDABot
registry for this instance of JDA.AccountTypeException
- Thrown if the currently logged in account is AccountType.CLIENT
RestAction<Webhook> getWebhookById(java.lang.String webhookId)
Webhook
by its id.
Possible ErrorResponses
caused by
the returned RestAction
include the following:
MISSING_PERMISSIONS
UNKNOWN_WEBHOOK
webhookId
- The webhook idRestAction
- Type: Webhook
java.lang.IllegalArgumentException
- If the webhookId
is null or emptyGuild.getWebhooks()
,
TextChannel.getWebhooks()
default RestAction<Webhook> getWebhookById(long webhookId)
Webhook
by its id.
Possible ErrorResponses
caused by
the returned RestAction
include the following:
MISSING_PERMISSIONS
UNKNOWN_WEBHOOK
webhookId
- The webhook idRestAction
- Type: Webhook
Guild.getWebhooks()
,
TextChannel.getWebhooks()