change: prettier code

This commit is contained in:
TriForMine
2021-10-21 16:07:35 +00:00
committed by GitHub Action
parent fe22c5ea73
commit 9a1f8f41a5
14 changed files with 112 additions and 68 deletions
+10 -5
View File
@@ -1,12 +1,17 @@
import type {Bot} from "../../bot.ts";
import type { Bot } from "../../bot.ts";
/** Edit the nickname of the bot in this guild */
export async function editBotNickname(bot: Bot, guildId: bigint, nickname: string | null) {
await bot.utils.requireBotGuildPermissions(bot,guildId, ["CHANGE_NICKNAME"]);
await bot.utils.requireBotGuildPermissions(bot, guildId, ["CHANGE_NICKNAME"]);
const response = await bot.rest.runMethod<{ nick: string }>(bot.rest,"patch", bot.constants.endpoints.USER_NICK(guildId), {
nick: nickname,
});
const response = await bot.rest.runMethod<{ nick: string }>(
bot.rest,
"patch",
bot.constants.endpoints.USER_NICK(guildId),
{
nick: nickname,
}
);
return response.nick;
}