REST
Constructors
new REST()
new REST(
token
?):REST
Parameters
Parameter | Type |
---|---|
token ? | string |
Returns
Defined in
Properties
BaseURL
readonly
static
BaseURL:"https://discord.com/api/v10/"
="https://discord.com/api/v10/"
Defined in
Methods
makeAPIRequest()
makeAPIRequest(method, path, data, reason)
makeAPIRequest<
T
>(method
,path
,data
,reason
?):Promise
<T
>
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
method | "GET" | "POST" | "PATCH" | "DELETE" | "PUT" |
path | string |
data | FormData |
reason ? | string |
Returns
Promise
<T
>
Defined in
makeAPIRequest(method, path, data, files)
makeAPIRequest<
T
>(method
,path
,data
?,files
?):Promise
<T
>
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
method | "GET" | "POST" | "PATCH" | "DELETE" | "PUT" |
path | string |
data ? | Record <string , any > |
files ? | LilybirdAttachment [] |
Returns
Promise
<T
>
Defined in
setToken()
setToken(
token
):void
Parameters
Parameter | Type |
---|---|
token | undefined | string |
Returns
void
Defined in
getGateway()
getGateway():
Promise
<object
>
Returns
Promise
<object
>
url
url:
string
Defined in
getGatewayBot()
getGatewayBot():
Promise
<GetGatewayBotResponse
>
Returns
Promise
<GetGatewayBotResponse
>
Defined in
getGlobalApplicationCommands()
getGlobalApplicationCommands(clientId)
getGlobalApplicationCommands(
clientId
):Promise
<GlobalStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
Returns
Promise
<GlobalStructure
[]>
Defined in
getGlobalApplicationCommands(clientId, withLocalizations)
getGlobalApplicationCommands(
clientId
,withLocalizations
):Promise
<GlobalStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
withLocalizations | true |
Returns
Promise
<GlobalStructure
[]>
Defined in
createGlobalApplicationCommand()
createGlobalApplicationCommand(
clientId
,body
):Promise
<GlobalStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
body | ApplicationCommandJSONParams |
Returns
Promise
<GlobalStructure
>
Defined in
getGlobalApplicationCommand()
getGlobalApplicationCommand(
clientId
,commandId
):Promise
<GlobalStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
commandId | string |
Returns
Promise
<GlobalStructure
>
Defined in
editGlobalApplicationCommand()
editGlobalApplicationCommand(
clientId
,commandId
,body
):Promise
<GlobalStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
commandId | string |
body | Partial <ApplicationCommandJSONParams > |
Returns
Promise
<GlobalStructure
>
Defined in
deleteGlobalApplicationCommand()
deleteGlobalApplicationCommand(
clientId
,commandId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
clientId | string |
commandId | string |
Returns
Promise
<null
>
Defined in
bulkOverwriteGlobalApplicationCommand()
bulkOverwriteGlobalApplicationCommand(
clientId
,body
):Promise
<GlobalStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
body | ApplicationCommandJSONParams [] |
Returns
Promise
<GlobalStructure
[]>
Defined in
getGuildApplicationCommands()
getGuildApplicationCommands(clientId)
getGuildApplicationCommands(
clientId
):Promise
<GuildStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
Returns
Promise
<GuildStructure
[]>
Defined in
getGuildApplicationCommands(clientId, withLocalizations)
getGuildApplicationCommands(
clientId
,withLocalizations
):Promise
<GuildStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
withLocalizations | true |
Returns
Promise
<GuildStructure
[]>
Defined in
createGuildApplicationCommand()
createGuildApplicationCommand(
clientId
,guildId
,body
):Promise
<GuildStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
body | ApplicationCommandJSONParams |
Returns
Promise
<GuildStructure
>
Defined in
getGuildApplicationCommand()
getGuildApplicationCommand(
clientId
,guildId
,commandId
):Promise
<GuildStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
commandId | string |
Returns
Promise
<GuildStructure
>
Defined in
editGuildApplicationCommand()
editGuildApplicationCommand(
clientId
,guildId
,commandId
,body
):Promise
<GuildStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
commandId | string |
body | Partial <ApplicationCommandJSONParams > |
Returns
Promise
<GuildStructure
>
Defined in
deleteGuildApplicationCommand()
deleteGuildApplicationCommand(
clientId
,guildId
,commandId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
commandId | string |
Returns
Promise
<null
>
Defined in
bulkOverwriteGuildApplicationCommand()
bulkOverwriteGuildApplicationCommand(
clientId
,guildId
,body
):Promise
<GuildStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
body | ApplicationCommandJSONParams [] |
Returns
Promise
<GuildStructure
[]>
Defined in
getGuildApplicationCommandPermissions()
getGuildApplicationCommandPermissions(
clientId
,guildId
):Promise
<GuildPermissionsStructure
[]>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
Returns
Promise
<GuildPermissionsStructure
[]>
Defined in
getApplicationCommandPermissions()
getApplicationCommandPermissions(
clientId
,guildId
,commandId
):Promise
<GuildPermissionsStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
commandId | string |
Returns
Promise
<GuildPermissionsStructure
>
Defined in
editApplicationCommandPermissions()
editApplicationCommandPermissions(
clientId
,guildId
,commandId
,body
):Promise
<GuildPermissionsStructure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
guildId | string |
commandId | string |
body | object |
body.permissions | PermissionsStructure [] |
Returns
Promise
<GuildPermissionsStructure
>
Defined in
createInteractionResponse()
createInteractionResponse(
interactionId
,interactionToken
,body
,files
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
interactionId | string |
interactionToken | string |
body | ResponseJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<null
>
Defined in
getOriginalInteractionResponse()
getOriginalInteractionResponse(
clientId
,interactionToken
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
Returns
Promise
<Structure
>
Defined in
editOriginalInteractionResponse()
editOriginalInteractionResponse(
clientId
,interactionToken
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
body | EditWebhookJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
deleteOriginalInteractionResponse()
deleteOriginalInteractionResponse(
clientId
,interactionToken
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
Returns
Promise
<null
>
Defined in
createFollowupMessage()
createFollowupMessage(
clientId
,interactionToken
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
body | ExecuteWebhookJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
getFollowupMessage()
getFollowupMessage(
clientId
,interactionToken
,messageId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
messageId | string |
Returns
Promise
<Structure
>
Defined in
editFollowupMessage()
editFollowupMessage(
clientId
,interactionToken
,messageId
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
messageId | string |
body | EditWebhookJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
deleteFollowupMessage()
deleteFollowupMessage(
clientId
,interactionToken
,messageId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
clientId | string |
interactionToken | string |
messageId | string |
Returns
Promise
<null
>
Defined in
getCurrentApplication()
getCurrentApplication():
Promise
<Structure
>
Returns
Promise
<Structure
>
Defined in
editCurrentApplication()
editCurrentApplication(
app
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
app | EditApplicationJSONParams |
Returns
Promise
<Structure
>
Defined in
getApplicationRoleConnectionMetadataRecords()
getApplicationRoleConnectionMetadataRecords(
applicationId
):Promise
<RoleConnectionMetadataStructure
[]>
Parameters
Parameter | Type |
---|---|
applicationId | string |
Returns
Promise
<RoleConnectionMetadataStructure
[]>
Defined in
updateApplicationRoleConnectionMetadataRecords()
updateApplicationRoleConnectionMetadataRecords(
applicationId
):Promise
<RoleConnectionMetadataStructure
[]>
Parameters
Parameter | Type |
---|---|
applicationId | string |
Returns
Promise
<RoleConnectionMetadataStructure
[]>
Defined in
getGuildAuditLog()
getGuildAuditLog(
guildId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.user_id ? | string |
params.action_type ? | AuditLogEvent |
params.before ? | string |
params.after ? | string |
params.limit ? | number |
Returns
Promise
<Structure
>
Defined in
listAutoModerationRulesForGuild()
listAutoModerationRulesForGuild(
guildId
):Promise
<RuleStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<RuleStructure
[]>
Defined in
getAutoModerationRule()
getAutoModerationRule(
guildId
,ruleId
):Promise
<RuleStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
ruleId | string |
Returns
Promise
<RuleStructure
>
Defined in
createAutoModerationRule()
createAutoModerationRule(
guildId
,rule
):Promise
<RuleStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
rule | CreateJSONParams |
Returns
Promise
<RuleStructure
>
Defined in
modifyAutoModerationRule()
modifyAutoModerationRule(
guildId
,ruleId
,rule
):Promise
<RuleStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
ruleId | string |
rule | Partial <Omit <CreateJSONParams , "trigger_type" >> |
Returns
Promise
<RuleStructure
>
Defined in
deleteAutoModerationRule()
deleteAutoModerationRule(
guildId
,ruleId
,reason
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
ruleId | string |
reason | string |
Returns
Promise
<null
>
Defined in
getChannel()
getChannel(
channelId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<Structure
>
Defined in
modifyChannel()
modifyChannel(
channelId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | DMChannelStructure | GuildChannelStructure | ThreadChannelStructure |
Returns
Promise
<Structure
>
Defined in
deleteChannel()
deleteChannel(
channelId
,reason
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
reason ? | string |
Returns
Promise
<Structure
>
Defined in
editChannelPermissions()
editChannelPermissions(
channelId
,overwriteId
,params
):Promise
<null
>
Parameters
Parameter | Type | Description |
---|---|---|
channelId | string | - |
overwriteId | string | - |
params | object | - |
params.reason ? | string | - |
params.allow ? | null | string | - |
params.deny ? | null | string | - |
params.type | 0 | 1 | 0 for a role or 1 for a member |
Returns
Promise
<null
>
Defined in
getChannelInvites()
getChannelInvites(
channelId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<Structure
[]>
Defined in
createChannelInvite()
createChannelInvite(
channelId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | CreateJSONParams |
Returns
Promise
<Structure
>
Defined in
deleteChannelPermission()
deleteChannelPermission(
channelId
,overwriteId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
overwriteId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
followAnnouncementChannel()
followAnnouncementChannel(
channelId
,body
):Promise
<FollowedChannelStructure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | object |
body.webhook_channel_id ? | string |
Returns
Promise
<FollowedChannelStructure
>
Defined in
triggerTypingIndicator()
triggerTypingIndicator(
channelId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<null
>
Defined in
getPinnedMessages()
getPinnedMessages(
channelId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<null
>
Defined in
pinMessage()
pinMessage(
channelId
,messageId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
unpinMessage()
unpinMessage(
channelId
,messageId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
groupDMAddRecipient()
groupDMAddRecipient(
channelId
,userId
,body
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
userId | string |
body | object |
body.access_token | string |
body.nick | string |
Returns
Promise
<null
>
Defined in
groupDMRemoveRecipient()
groupDMRemoveRecipient(
channelId
,userId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
userId | string |
Returns
Promise
<null
>
Defined in
startThreadFromMessage()
startThreadFromMessage(
channelId
,messageId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
body | ThreadFromMessageJSONParams |
Returns
Promise
<Structure
>
Defined in
startThreadWithoutMessage()
startThreadWithoutMessage(
channelId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | ThreadJSONParams |
Returns
Promise
<Structure
>
Defined in
startThreadInForumOrMediaChannel()
startThreadInForumOrMediaChannel(
channelId
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | ForumMediaThreadJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
joinThread()
joinThread(
channelId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<null
>
Defined in
addThreadMember()
addThreadMember(
channelId
,userId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
userId | string |
Returns
Promise
<null
>
Defined in
leaveThread()
leaveThread(
channelId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<null
>
Defined in
removeThreadMember()
removeThreadMember(
channelId
,userId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
userId | string |
Returns
Promise
<null
>
Defined in
getThreadMember()
getThreadMember(
channelId
,userId
,withMember
):Promise
<ThreadMemberStructure
>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
userId | string | undefined |
withMember | boolean | false |
Returns
Promise
<ThreadMemberStructure
>
Defined in
listThreadMembers()
listThreadMembers(
channelId
,params
):Promise
<ThreadMemberStructure
[]>
Parameters
Parameter | Type |
---|---|
channelId | string |
params | object |
params.after ? | number |
params.limit ? | string |
Returns
Promise
<ThreadMemberStructure
[]>
Defined in
listPublicArchivedThreads()
listPublicArchivedThreads(
channelId
,params
):Promise
<ListArchivedThreadsReturnStructure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
params | object |
params.before ? | string |
params.limit ? | string |
Returns
Promise
<ListArchivedThreadsReturnStructure
>
Defined in
listPrivateArchivedThreads()
listPrivateArchivedThreads(
channelId
,params
):Promise
<ListArchivedThreadsReturnStructure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
params | object |
params.before ? | string |
params.limit ? | string |
Returns
Promise
<ListArchivedThreadsReturnStructure
>
Defined in
listJoinedPrivateArchivedThreads()
listJoinedPrivateArchivedThreads(
channelId
,params
):Promise
<ListArchivedThreadsReturnStructure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
params | object |
params.before ? | string |
params.limit ? | string |
Returns
Promise
<ListArchivedThreadsReturnStructure
>
Defined in
listGuildEmojis()
listGuildEmojis(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
getGuildEmoji()
getGuildEmoji(
guildId
,emojiId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
emojiId | string |
Returns
Promise
<Structure
>
Defined in
createGuildEmoji()
createGuildEmoji(
guildId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.name | string |
params.image | ImageData |
params.roles | string [] |
params.reason ? | string |
Returns
Promise
<Structure
>
Defined in
modifyGuildEmoji()
modifyGuildEmoji(
guildId
,emojiId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
emojiId | string |
params | object |
params.name ? | string |
params.roles ? | null | string [] |
params.reason | string |
Returns
Promise
<Structure
>
Defined in
deleteGuildEmoji()
deleteGuildEmoji(
guildId
,emojiId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
emojiId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
listApplicationEmojis()
listApplicationEmojis(
applicationId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
applicationId | string |
Returns
Promise
<Structure
[]>
Defined in
getApplicationEmoji()
getApplicationEmoji(
applicationId
,emojiId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
applicationId | string |
emojiId | string |
Returns
Promise
<Structure
>
Defined in
createApplicationEmoji()
createApplicationEmoji(
applicationId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
applicationId | string |
params | object |
params.name | string |
params.image | ImageData |
Returns
Promise
<Structure
>
Defined in
modifyApplicationEmoji()
modifyApplicationEmoji(
applicationId
,emojiId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
applicationId | string |
emojiId | string |
params | object |
params.name | string |
Returns
Promise
<Structure
>
Defined in
deleteApplicationEmoji()
deleteApplicationEmoji(
applicationId
,emojiId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
applicationId | string |
emojiId | string |
Returns
Promise
<null
>
Defined in
createGuild()
createGuild(
body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
body | GuildJSONParams |
Returns
Promise
<Structure
>
Defined in
getGuild()
getGuild(
guildId
,withCounts
):Promise
<Structure
>
Parameters
Parameter | Type | Default value |
---|---|---|
guildId | string | undefined |
withCounts | boolean | false |
Returns
Promise
<Structure
>
Defined in
getGuildPreview()
getGuildPreview(
guildId
):Promise
<PreviewStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<PreviewStructure
>
Defined in
modifyGuild()
modifyGuild(
guildId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | GuildJSONParams |
Returns
Promise
<Structure
>
Defined in
deleteGuild()
deleteGuild(
guildId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<null
>
Defined in
getGuildChannels()
getGuildChannels(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
createGuildChannel()
createGuildChannel(
guildId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | GuildChannelJSONParams |
Returns
Promise
<Structure
>
Defined in
modifyGuildChannelPositions()
modifyGuildChannelPositions(
guildId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | ChannelPositionJSONParams [] |
Returns
Promise
<Structure
>
Defined in
listActiveGuildThreads()
listActiveGuildThreads(
guildId
):Promise
<object
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<object
>
threads
threads:
ThreadChannelStructure
[]
members
members:
ThreadMemberStructure
[]
Defined in
getGuildMember()
getGuildMember(
guildId
,userId
):Promise
<MemberStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
Returns
Promise
<MemberStructure
>
Defined in
listGuildMembers()
listGuildMembers(
guildId
,params
):Promise
<MemberStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.limit | number |
params.after | string |
Returns
Promise
<MemberStructure
[]>
Defined in
searchGuildMembers()
searchGuildMembers(
guildId
,params
):Promise
<MemberStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.query | string |
params.limit | number |
Returns
Promise
<MemberStructure
[]>
Defined in
addGuildMember()
addGuildMember(
guildId
,userId
,body
):Promise
<null
|MemberStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
body | object |
body.access_token | string |
body.nick ? | string |
body.roles ? | string [] |
body.mute ? | boolean |
body.deaf ? | boolean |
Returns
Promise
<null
| MemberStructure
>
Defined in
modifyGuildMember()
modifyGuildMember(
guildId
,userId
,body
):Promise
<MemberStructure
>
Parameters
Parameter | Type | Description |
---|---|---|
guildId | string | - |
userId | string | - |
body | object | - |
body.reason ? | null | string | - |
body.nick ? | null | string | - |
body.roles ? | null | string [] | - |
body.mute ? | null | boolean | - |
body.deaf ? | null | boolean | - |
body.channel_id ? | null | string | - |
body.communication_disabled_until ? | null | string | ISO8601 timestamp |
body.flags ? | null | number | - |
Returns
Promise
<MemberStructure
>
Defined in
modifyCurrentMember()
modifyCurrentMember(
guildId
,body
):Promise
<MemberStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.reason ? | null | string |
body.nick ? | null | string |
Returns
Promise
<MemberStructure
>
Defined in
addGuildMemberRole()
addGuildMemberRole(
guildId
,userId
,roleId
,reason
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
roleId | string |
reason | string |
Returns
Promise
<null
>
Defined in
removeGuildMemberRole()
removeGuildMemberRole(
guildId
,userId
,roleId
,reason
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
roleId | string |
reason | string |
Returns
Promise
<null
>
Defined in
removeGuildMember()
removeGuildMember(
guildId
,userId
,reason
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
reason | string |
Returns
Promise
<null
>
Defined in
getGuildBans()
getGuildBans(
guildId
,params
):Promise
<BanStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.before | string |
params.after | string |
params.limit | string |
Returns
Promise
<BanStructure
[]>
Defined in
getGuildBan()
getGuildBan(
guildId
,userId
):Promise
<BanStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
Returns
Promise
<BanStructure
>
Defined in
createGuildBan()
createGuildBan(
guildId
,userId
,body
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
body | object |
body.reason ? | string |
body.delete_message_seconds ? | number |
Returns
Promise
<null
>
Defined in
removeGuildBan()
removeGuildBan(
guildId
,userId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
getGuildRoles()
getGuildRoles(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
getGuildRole()
getGuildRole(
guildId
,roleId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
roleId | string |
Returns
Promise
<Structure
>
Defined in
createGuildRole()
createGuildRole(
guildId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | JSONParams |
Returns
Promise
<Structure
>
Defined in
modifyGuildRolePosition()
modifyGuildRolePosition(
guildId
,body
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.reason ? | string |
body.id | string |
body.position ? | null | number |
Returns
Promise
<Structure
[]>
Defined in
modifyGuildRole()
modifyGuildRole(
guildId
,roleId
,body
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
roleId | string |
body | Partial <JSONParams > |
Returns
Promise
<Structure
>
Defined in
modifyGuildMFALevel()
modifyGuildMFALevel(
guildId
,level
):Promise
<MFALevel
>
Parameters
Parameter | Type |
---|---|
guildId | string |
level | MFALevel |
Returns
Promise
<MFALevel
>
Defined in
deleteGuildRole()
deleteGuildRole(
guildId
,roleId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
roleId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
getGuildPruneCount()
getGuildPruneCount(
guildId
,params
):Promise
<object
>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.days | number |
params.include_roles ? | string |
Returns
Promise
<object
>
pruned
pruned:
number
Defined in
beginGuildPrune()
beginGuildPrune(
guildId
,body
):Promise
<object
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.days ? | number |
body.compute_prune_count ? | boolean |
body.include_roles ? | string [] |
body.reason ? | string |
Returns
Promise
<object
>
pruned
pruned:
null
|number
Defined in
getGuildVoiceRegions()
getGuildVoiceRegions(
guildId
):Promise
<RegionStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<RegionStructure
[]>
Defined in
getGuildInvites()
getGuildInvites(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
getGuildIntegrations()
getGuildIntegrations(
guildId
):Promise
<IntegrationStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<IntegrationStructure
[]>
Defined in
deleteGuildIntegration()
deleteGuildIntegration(
guildId
,integrationId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
integrationId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
getGuildWidgetSettings()
getGuildWidgetSettings(
guildId
):Promise
<WidgetSettingsStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<WidgetSettingsStructure
>
Defined in
modifyGuildWidget()
modifyGuildWidget(
guildId
,body
):Promise
<WidgetSettingsStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | WidgetSettingsStructure & object |
Returns
Promise
<WidgetSettingsStructure
>
Defined in
getGuildWidget()
getGuildWidget(
guildId
):Promise
<WidgetStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<WidgetStructure
>
Defined in
getGuildVanityUrl()
getGuildVanityUrl(
guildId
):Promise
<Partial
<Structure
>>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Partial
<Structure
>>
Defined in
getGuildWidgetImage()
getGuildWidgetImage(
guildId
,style
):Promise
<string
>
Yeah… this probably doesn’t work
Parameters
Parameter | Type | Default value |
---|---|---|
guildId | string | undefined |
style | string | "shield" |
Returns
Promise
<string
>
Defined in
getGuildWelcomeScreen()
getGuildWelcomeScreen(
guildId
):Promise
<WelcomeScreenStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<WelcomeScreenStructure
>
Defined in
modifyGuildWelcomeScreen()
modifyGuildWelcomeScreen(
guildId
,body
):Promise
<WelcomeScreenStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.reason ? | string |
body.enabled ? | null | boolean |
body.welcome_channels ? | null | WelcomeScreenChannelStructure [] |
body.description ? | null | string |
Returns
Promise
<WelcomeScreenStructure
>
Defined in
getGuildOnboarding()
getGuildOnboarding(
guildId
):Promise
<OnboardingStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<OnboardingStructure
>
Defined in
modifyGuildOnboarding()
modifyGuildOnboarding(
guildId
,body
):Promise
<OnboardingStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.reason ? | string |
body.prompts | OnboardingPromptStructure [] |
body.default_channel_ids | string [] |
body.enabled | boolean |
body.mode | OnboardingMode |
Returns
Promise
<OnboardingStructure
>
Defined in
modifyCurrentUserVoiceState()
modifyCurrentUserVoiceState(
guildId
,body
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
body | object |
body.channel_id ? | string |
body.suppress ? | boolean |
body.request_to_speak_timestamp ? | null | string |
Returns
Promise
<null
>
Defined in
modifyUserVoiceState()
modifyUserVoiceState(
guildId
,userId
,body
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
body | object |
body.channel_id | string |
body.suppress ? | boolean |
Returns
Promise
<null
>
Defined in
listScheduledEventsForGuild()
listScheduledEventsForGuild(
guildId
,params
):Promise
<ScheduledEventStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
params | object |
params.with_user_count ? | boolean |
Returns
Promise
<ScheduledEventStructure
[]>
Defined in
createGuildScheduledEvent()
createGuildScheduledEvent(
guildId
,event
):Promise
<ScheduledEventStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
event | ScheduledEventJSONParams |
Returns
Promise
<ScheduledEventStructure
>
Defined in
getGuildScheduledEvent()
getGuildScheduledEvent(
guildId
,eventId
,params
):Promise
<ScheduledEventStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
eventId | string |
params | object |
params.with_user_count ? | boolean |
Returns
Promise
<ScheduledEventStructure
[]>
Defined in
modifyGuildScheduledEvent()
modifyGuildScheduledEvent(
guildId
,eventId
,event
):Promise
<ScheduledEventStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
eventId | string |
event | Partial <ScheduledEventJSONParams > |
Returns
Promise
<ScheduledEventStructure
>
Defined in
deleteGuildScheduledEvent()
deleteGuildScheduledEvent(
guildId
,eventId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
eventId | string |
Returns
Promise
<null
>
Defined in
getGuildScheduledEventUsers()
getGuildScheduledEventUsers(
guildId
,eventId
,params
):Promise
<object
>
Parameters
Parameter | Type |
---|---|
guildId | string |
eventId | string |
params | object |
params.limit ? | number |
params.with_member ? | boolean |
params.before ? | string |
params.after ? | string |
Returns
Promise
<object
>
guild_scheduled_event_id
guild_scheduled_event_id:
string
user
user:
Structure
member?
optional
member:MemberStructure
Defined in
getGuildTemplate()
getGuildTemplate(
templateCode
):Promise
<TemplateStructure
>
Parameters
Parameter | Type |
---|---|
templateCode | string |
Returns
Promise
<TemplateStructure
>
Defined in
createGuildFromGuildTemplate()
createGuildFromGuildTemplate(
templateCode
,guild
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
templateCode | string |
guild | object |
guild.name | string |
guild.image ? | ImageData |
Returns
Promise
<Structure
>
Defined in
getGuildTemplates()
getGuildTemplates(
guildId
):Promise
<TemplateStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<TemplateStructure
[]>
Defined in
createGuildTemplate()
createGuildTemplate(
guildId
,template
):Promise
<TemplateStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
template | object |
template.name | string |
template.description ? | null | string |
Returns
Promise
<TemplateStructure
>
Defined in
syncGuildTemplate()
syncGuildTemplate(
guildId
,templateCode
):Promise
<TemplateStructure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
templateCode | string |
Returns
Promise
<TemplateStructure
[]>
Defined in
modifyGuildTemplate()
modifyGuildTemplate(
guildId
,templateCode
,template
):Promise
<TemplateStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
templateCode | string |
template | object |
template.name ? | string |
template.description ? | null | string |
Returns
Promise
<TemplateStructure
>
Defined in
deleteGuildTemplate()
deleteGuildTemplate(
guildId
,templateCode
):Promise
<TemplateStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
templateCode | string |
Returns
Promise
<TemplateStructure
>
Defined in
getInvite()
getInvite(
inviteCode
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
inviteCode | string |
Returns
Promise
<Structure
>
Defined in
deleteInvite()
deleteInvite(
inviteCode
,reason
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
inviteCode | string |
reason ? | string |
Returns
Promise
<Structure
>
Defined in
getChannelMessages()
getChannelMessages(
channelId
,params
):Promise
<Structure
[]>
Parameters
Parameter | Type | Description |
---|---|---|
channelId | string | - |
params | object | - |
params.around ? | string | - |
params.before ? | string | - |
params.after ? | string | - |
params.limit ? | number | 0-100 Default 50 |
Returns
Promise
<Structure
[]>
Defined in
getChannelMessage()
getChannelMessage(
channelId
,messageId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
Returns
Promise
<Structure
>
Defined in
createMessage()
createMessage(
channelId
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
body | CreateJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
crosspostMessage()
crosspostMessage(
channelId
,messageId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
Returns
Promise
<Structure
>
Defined in
createReaction()
createReaction(
channelId
,messageId
,emoji
,isCustom
):Promise
<null
>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
messageId | string | undefined |
emoji | string | undefined |
isCustom | boolean | false |
Returns
Promise
<null
>
Defined in
deleteOwnReaction()
deleteOwnReaction(
channelId
,messageId
,emoji
,isCustom
):Promise
<null
>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
messageId | string | undefined |
emoji | string | undefined |
isCustom | boolean | false |
Returns
Promise
<null
>
Defined in
deleteUserReaction()
deleteUserReaction(
channelId
,messageId
,userId
,emoji
,isCustom
):Promise
<null
>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
messageId | string | undefined |
userId | string | undefined |
emoji | string | undefined |
isCustom | boolean | false |
Returns
Promise
<null
>
Defined in
getReactions()
getReactions(
channelId
,messageId
,emoji
,isCustom
,params
):Promise
<Structure
[]>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
messageId | string | undefined |
emoji | string | undefined |
isCustom | boolean | false |
params | object | {} |
params.after ? | number | undefined |
params.limit ? | string | undefined |
Returns
Promise
<Structure
[]>
Defined in
deleteAllReactions()
deleteAllReactions(
channelId
,messageId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
Returns
Promise
<null
>
Defined in
deleteAllReactionsForEmoji()
deleteAllReactionsForEmoji(
channelId
,messageId
,emoji
,isCustom
):Promise
<null
>
Parameters
Parameter | Type | Default value |
---|---|---|
channelId | string | undefined |
messageId | string | undefined |
emoji | string | undefined |
isCustom | boolean | false |
Returns
Promise
<null
>
Defined in
editMessage()
editMessage(
channelId
,messageId
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
body | EditJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
deleteMessage()
deleteMessage(
channelId
,messageId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
bulkDeleteMessages()
bulkDeleteMessages(
channelId
,messageIds
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageIds | string [] |
reason ? | string |
Returns
Promise
<null
>
Defined in
getAnswerVoters()
getAnswerVoters(
channelId
,messageId
,answerId
,params
):Promise
<AnswerVotersStructure
>
Parameters
Parameter | Type | Description |
---|---|---|
channelId | string | - |
messageId | string | - |
answerId | number | - |
params | object | - |
params.after ? | string | - |
params.limit ? | number | 0-100 Default 25 |
Returns
Promise
<AnswerVotersStructure
>
Defined in
endPoll()
endPoll(
channelId
,messageId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
messageId | string |
Returns
Promise
<Structure
>
Defined in
createStageInstance()
createStageInstance(
instance
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
instance | CreateJSONParams |
Returns
Promise
<Structure
>
Defined in
getStageInstance()
getStageInstance(
channelId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<Structure
>
Defined in
modifyStageInstance()
modifyStageInstance(
channelId
,data
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
data | object |
data.topic ? | string |
data.privacy_level ? | PrivacyLevel |
data.reason ? | string |
Returns
Promise
<Structure
>
Defined in
deleteStageInstance()
deleteStageInstance(
channelId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
channelId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
getSticker()
getSticker(
stickerId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
stickerId | string |
Returns
Promise
<Structure
>
Defined in
listStickerPacks()
listStickerPacks():
Promise
<object
>
Returns
Promise
<object
>
sticker_packs
sticker_packs:
PackStructure
[]
Defined in
getStickerPack()
getStickerPack(
packId
):Promise
<PackStructure
>
Parameters
Parameter | Type |
---|---|
packId | string |
Returns
Promise
<PackStructure
>
Defined in
listGuildStickers()
listGuildStickers(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
getGuildSticker()
getGuildSticker(
guildId
,stickerId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
stickerId | string |
Returns
Promise
<Structure
>
Defined in
createGuildSticker()
createGuildSticker(
guildId
,stickerId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
stickerId | string |
params | object |
params.name | string |
params.description | string |
params.tags | string |
params.file | Blob |
params.reason ? | string |
Returns
Promise
<Structure
>
Defined in
modifyGuildSticker()
modifyGuildSticker(
guildId
,stickerId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
stickerId | string |
params | object |
params.name ? | string |
params.description ? | string |
params.tags ? | string |
params.reason ? | string |
Returns
Promise
<Structure
>
Defined in
deleteGuildSticker()
deleteGuildSticker(
guildId
,stickerId
,reason
?):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
stickerId | string |
reason ? | string |
Returns
Promise
<null
>
Defined in
getCurrentUser()
getCurrentUser():
Promise
<Structure
>
Returns
Promise
<Structure
>
Defined in
getUser()
getUser(
userId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
userId | string |
Returns
Promise
<Structure
>
Defined in
modifyCurrentUser()
modifyCurrentUser(
body
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
body ? | object |
body.username ? | string |
body.avatar ? | string |
Returns
Promise
<Structure
>
Defined in
getCurrentUserGuilds()
getCurrentUserGuilds(
params
):Promise
<Partial
<Structure
>[]>
Parameters
Parameter | Type |
---|---|
params | object |
params.before | string |
params.after | string |
params.limit | string |
params.withCounts | boolean |
Returns
Promise
<Partial
<Structure
>[]>
Defined in
getCurrentUserGuildMember()
getCurrentUserGuildMember(
guildId
):Promise
<MemberStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<MemberStructure
>
Defined in
leaveGuild()
leaveGuild(
guildId
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<null
>
Defined in
createDM()
createDM(
userId
):Promise
<DMChannelStructure
>
Parameters
Parameter | Type |
---|---|
userId | string |
Returns
Promise
<DMChannelStructure
>
Defined in
createGroupDM()
createGroupDM(
tokens
,nicks
):Promise
<DMChannelStructure
>
Parameters
Parameter | Type |
---|---|
tokens | string [] |
nicks | Record <string , string > |
Returns
Promise
<DMChannelStructure
>
Defined in
listVoiceRegions()
listVoiceRegions():
Promise
<RegionStructure
[]>
Returns
Promise
<RegionStructure
[]>
Defined in
getCurrentUserVoiceState()
getCurrentUserVoiceState(
guildId
):Promise
<StateStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<StateStructure
>
Defined in
getUserVoiceState()
getUserVoiceState(
guildId
,userId
):Promise
<StateStructure
>
Parameters
Parameter | Type |
---|---|
guildId | string |
userId | string |
Returns
Promise
<StateStructure
>
Defined in
createWebhook()
createWebhook(
channelId
,webhook
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
channelId | string |
webhook | object |
webhook.name | string |
webhook.avatar ? | null | ImageData |
Returns
Promise
<Structure
>
Defined in
getChannelWebhooks()
getChannelWebhooks(
channelId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
channelId | string |
Returns
Promise
<Structure
[]>
Defined in
getGuildWebhooks()
getGuildWebhooks(
guildId
):Promise
<Structure
[]>
Parameters
Parameter | Type |
---|---|
guildId | string |
Returns
Promise
<Structure
[]>
Defined in
getWebhook()
getWebhook(
webhookId
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
Returns
Promise
<Structure
>
Defined in
getWebhookWithToken()
getWebhookWithToken(
webhookId
,token
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
Returns
Promise
<Structure
>
Defined in
modifyWebhook()
modifyWebhook(
webhookId
,webhook
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
webhook | object |
webhook.name ? | string |
webhook.avatar ? | null | ImageData |
webhook.channel_id ? | string |
webhook.reason ? | string |
Returns
Promise
<Structure
>
Defined in
modifyWebhookWithToken()
modifyWebhookWithToken(
webhookId
,token
,webhook
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
webhook | object |
webhook.name ? | string |
webhook.avatar ? | null | ImageData |
webhook.channel_id ? | string |
webhook.reason ? | string |
Returns
Promise
<Structure
>
Defined in
deleteWebhook()
deleteWebhook(
webhookId
,reason
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
reason ? | string |
Returns
Promise
<Structure
>
Defined in
deleteWebhookWithToken()
deleteWebhookWithToken(
webhookId
,token
,reason
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
reason ? | string |
Returns
Promise
<Structure
>
Defined in
executeWebhook()
executeWebhook(
webhookId
,token
,params
,body
,files
?):Promise
<null
|Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
params | object |
params.wait ? | boolean |
params.thread_id ? | string |
body ? | ExecuteWebhookJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<null
| Structure
>
Defined in
getWebhookMessage()
getWebhookMessage(
webhookId
,token
,messageId
,params
):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
messageId | string |
params | object |
params.thread_id ? | string |
Returns
Promise
<Structure
>
Defined in
editWebhookMessage()
editWebhookMessage(
webhookId
,token
,messageId
,params
,body
,files
?):Promise
<Structure
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
messageId | string |
params | object |
params.thread_id ? | string |
body | EditWebhookJSONParams |
files ? | LilybirdAttachment [] |
Returns
Promise
<Structure
>
Defined in
deleteWebhookMessage()
deleteWebhookMessage(
webhookId
,token
,messageId
,params
):Promise
<null
>
Parameters
Parameter | Type |
---|---|
webhookId | string |
token | string |
messageId | string |
params | object |
params.thread_id ? | string |
Returns
Promise
<null
>