This commit is contained in:
ITOH
2021-04-24 19:38:38 +02:00
parent 0feb6822d0
commit 03db98cd48
11 changed files with 40 additions and 43 deletions
+7 -3
View File
@@ -9,9 +9,13 @@ export async function editBotNickname(
) {
await requireBotGuildPermissions(guildId, ["CHANGE_NICKNAME"]);
const response = await rest.runMethod("patch", endpoints.USER_NICK(guildId), {
nick: nickname,
}) as { nick: string };
const response = await rest.runMethod<{ nick: string }>(
"patch",
endpoints.USER_NICK(guildId),
{
nick: nickname,
},
);
return response.nick;
}