Add botBannerURL to edit current bot banner (#3620)

This commit is contained in:
Fleny
2024-05-26 20:58:17 +02:00
committed by GitHub
parent f8f976acf4
commit c6ca749a4f
2 changed files with 4 additions and 2 deletions

View File

@@ -786,11 +786,13 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
async editBotProfile(options) {
const avatar = options?.botAvatarURL ? await urlToBase64(options?.botAvatarURL) : options?.botAvatarURL
const banner = options?.botBannerURL ? await urlToBase64(options?.botBannerURL) : options?.botBannerURL
return await rest.patch<DiscordUser>(rest.routes.currentUser(), {
body: {
username: options.username?.trim(),
avatar,
banner,
},
})
},

View File

@@ -1030,10 +1030,10 @@ export interface RestManager {
reason?: string,
) => Promise<CamelizedDiscordAutoModerationRule>
/**
* Modifies the bot's username or avatar.
* Modifies the bot's username, avatar or banner.
* NOTE: username: if changed may cause the bot's discriminator to be randomized.
*/
editBotProfile: (options: { username?: string; botAvatarURL?: string | null }) => Promise<CamelizedDiscordUser>
editBotProfile: (options: { username?: string; botAvatarURL?: string | null; botBannerURL?: string | null }) => Promise<CamelizedDiscordUser>
/**
* Edits a channel's settings.
*