mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 21:16:09 +00:00
feat: Guild.unbanMember
This commit is contained in:
parent
ea5f3d53a8
commit
bc324f5d29
@ -264,6 +264,17 @@ export class Guild extends BaseGuild implements Model {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unbans the member
|
||||
* */
|
||||
async unbanMember(memberId: Snowflake) {
|
||||
await this.session.rest.runMethod<undefined>(
|
||||
this.session.rest,
|
||||
"DELETE",
|
||||
Routes.GUILD_BAN(this.id, memberId),
|
||||
);
|
||||
}
|
||||
|
||||
async editMember(memberId: Snowflake, options: ModifyGuildMember) {
|
||||
const member = await this.session.rest.runMethod<DiscordMemberWithUser>(
|
||||
this.session.rest,
|
||||
|
@ -68,6 +68,10 @@ export class Member implements Model {
|
||||
return this;
|
||||
}
|
||||
|
||||
async unban() {
|
||||
await Guild.prototype.unbanMember.call({ id: this.guildId, session: this.session }, this.user.id);
|
||||
}
|
||||
|
||||
async edit(options: ModifyGuildMember): Promise<Member> {
|
||||
const member = await Guild.prototype.editMember.call({ id: this.guildId, session: this.session }, this.user.id, options);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user