more fixes

This commit is contained in:
Skillz4Killz
2021-11-10 20:26:23 +00:00
committed by GitHub
parent e0955df780
commit e3539934db
17 changed files with 101 additions and 13 deletions
+6 -4
View File
@@ -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;