From 8b7eb7d84b46b40230e74b341cc0e5759a15d845 Mon Sep 17 00:00:00 2001 From: ayntee Date: Mon, 30 Nov 2020 09:44:04 +0400 Subject: [PATCH 1/3] fix: resolve urlToBase64() promise --- src/handlers/member.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/handlers/member.ts b/src/handlers/member.ts index ad3aa8931..1c89c19d5 100644 --- a/src/handlers/member.ts +++ b/src/handlers/member.ts @@ -233,7 +233,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 @@ -252,11 +252,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, }, ); } From b6001affd0395ea48e7c2804872e0895d619f383 Mon Sep 17 00:00:00 2001 From: Ayyan Date: Mon, 30 Nov 2020 13:40:17 +0400 Subject: [PATCH 2/3] docs: add dencord-starter to the boilerplate list --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b1d6a2d4a..249bf360d 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. From 7764b0cdfb4e0cdb6b96d3604aa878b2b1a7ff28 Mon Sep 17 00:00:00 2001 From: Ayyan Date: Mon, 30 Nov 2020 13:41:02 +0400 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 249bf360d..b1a409b7a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ If you are a beginner developer, you may check out these awesome official and un - [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) + - [GitHub](https://github.com/ayntee/dencord-starter) If you do not wish to use a boilerplate, you may continue reading.