mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
Add botBannerURL to edit current bot banner (#3620)
This commit is contained in:
@@ -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,
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user