diff --git a/README.md b/README.md index b1d6a2d4a..b1a409b7a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ If you are a beginner developer, you may check out these awesome official and un - Official Discordeno Boilerplate - [GitHub](https://github.com/Skillz4Killz/Discordeno-bot-template) - [Features](https://github.com/Skillz4Killz/Discordeno-bot-template#features) +- Dencord Starter + - [GitHub](https://github.com/ayntee/dencord-starter) If you do not wish to use a boilerplate, you may continue reading. diff --git a/src/handlers/member.ts b/src/handlers/member.ts index 1f342519a..0a4c3b2a7 100644 --- a/src/handlers/member.ts +++ b/src/handlers/member.ts @@ -232,7 +232,7 @@ export function moveMember( /** Modifies the bot's username or avatar. * NOTE: username: if changed may cause the bot's discriminator to be randomized. */ -export function editBotProfile(username?: string, avatarURL?: string) { +export async function editBotProfile(username?: string, avatarURL?: string) { // Nothing was edited if (!username && !avatarURL) return; // Check username requirements if username was provided @@ -251,11 +251,12 @@ export function editBotProfile(username?: string, avatarURL?: string) { } } + const avatar = avatarURL ? await urlToBase64(avatarURL) : undefined; RequestManager.patch( endpoints.USER_BOT, { username: username?.trim(), - avatar: avatarURL ? urlToBase64(avatarURL) : undefined, + avatar, }, ); }