refactor!: move dirs outside of src/ (#2032)

This commit is contained in:
Skillz4Killz
2022-02-11 04:49:53 -05:00
committed by GitHub
parent 471ef5cb6c
commit 8aaea9f339
594 changed files with 84 additions and 66 deletions
+22
View File
@@ -0,0 +1,22 @@
import type { ModifyGuildMember } from "../../types/guilds/modifyGuildMember.ts";
import type { GuildMemberWithUser } from "../../types/members/guildMember.ts";
import type { Bot } from "../../bot.ts";
/** Edit the member */
export async function editMember(bot: Bot, guildId: bigint, memberId: bigint, options: ModifyGuildMember) {
const result = await bot.rest.runMethod<GuildMemberWithUser>(
bot.rest,
"patch",
bot.constants.endpoints.GUILD_MEMBER(guildId, memberId),
{
nick: options.nick,
roles: options.roles,
mute: options.mute,
deaf: options.deaf,
channel_id: options.channelId,
communication_disabled_until: options.communicationDisabledUntil,
},
);
return bot.transformers.member(bot, result, guildId, memberId);
}