mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +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) {
|
async editMember(memberId: Snowflake, options: ModifyGuildMember) {
|
||||||
const member = await this.session.rest.runMethod<DiscordMemberWithUser>(
|
const member = await this.session.rest.runMethod<DiscordMemberWithUser>(
|
||||||
this.session.rest,
|
this.session.rest,
|
||||||
|
@ -68,6 +68,10 @@ export class Member implements Model {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async unban() {
|
||||||
|
await Guild.prototype.unbanMember.call({ id: this.guildId, session: this.session }, this.user.id);
|
||||||
|
}
|
||||||
|
|
||||||
async edit(options: ModifyGuildMember): Promise<Member> {
|
async edit(options: ModifyGuildMember): Promise<Member> {
|
||||||
const member = await Guild.prototype.editMember.call({ id: this.guildId, session: this.session }, this.user.id, options);
|
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