mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
change: prettier code
This commit is contained in:
committed by
GitHub Action
parent
fe22c5ea73
commit
9a1f8f41a5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user