mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
refactor!: move dirs outside of src/ (#2032)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user