mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
more fixes
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
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) {
|
||||
export async function editBotNickname(
|
||||
bot: Bot,
|
||||
guildId: bigint,
|
||||
options: { nick: string | null; reason?: string }
|
||||
) {
|
||||
const response = await bot.rest.runMethod<{ nick: string }>(
|
||||
bot.rest,
|
||||
"patch",
|
||||
bot.constants.endpoints.USER_NICK(guildId),
|
||||
{
|
||||
nick: nickname,
|
||||
}
|
||||
options
|
||||
);
|
||||
|
||||
return response.nick;
|
||||
|
||||
Reference in New Issue
Block a user