mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
chore: apply formatting
This commit is contained in:
parent
a45069ea5f
commit
113e315e07
@ -1,45 +1,45 @@
|
|||||||
import type { RESTPostAPIChannelInviteJSONBody } from '../../types';
|
import type { RESTPostAPIChannelInviteJSONBody } from '../../types';
|
||||||
import { toCamelCase } from '../it/utils';
|
import { toCamelCase } from '../it/utils';
|
||||||
import { BaseShorter } from './base';
|
import { BaseShorter } from './base';
|
||||||
|
|
||||||
export class InvitesShorter extends BaseShorter {
|
export class InvitesShorter extends BaseShorter {
|
||||||
get(code: string) {
|
get(code: string) {
|
||||||
return this.client.proxy
|
return this.client.proxy
|
||||||
.invites(code)
|
.invites(code)
|
||||||
.get()
|
.get()
|
||||||
.then(x => toCamelCase(x));
|
.then(x => toCamelCase(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(code: string, reason?: string) {
|
delete(code: string, reason?: string) {
|
||||||
return this.client.proxy
|
return this.client.proxy
|
||||||
.invites(code)
|
.invites(code)
|
||||||
.delete({ reason })
|
.delete({ reason })
|
||||||
.then(x => toCamelCase(x));
|
.then(x => toCamelCase(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
channels = {
|
channels = {
|
||||||
create: ({ channelId, reason, ...body }: CreateInviteFromChannel) =>
|
create: ({ channelId, reason, ...body }: CreateInviteFromChannel) =>
|
||||||
this.client.proxy
|
this.client.proxy
|
||||||
.channels(channelId)
|
.channels(channelId)
|
||||||
.invites.post({ body, reason })
|
.invites.post({ body, reason })
|
||||||
.then(x => toCamelCase(x)),
|
.then(x => toCamelCase(x)),
|
||||||
list: (channelId: string) =>
|
list: (channelId: string) =>
|
||||||
this.client.proxy
|
this.client.proxy
|
||||||
.channels(channelId)
|
.channels(channelId)
|
||||||
.invites.get()
|
.invites.get()
|
||||||
.then(x => toCamelCase(x)),
|
.then(x => toCamelCase(x)),
|
||||||
};
|
};
|
||||||
|
|
||||||
guilds = {
|
guilds = {
|
||||||
list: (guildId: string) =>
|
list: (guildId: string) =>
|
||||||
this.client.proxy
|
this.client.proxy
|
||||||
.guilds(guildId)
|
.guilds(guildId)
|
||||||
.invites.get()
|
.invites.get()
|
||||||
.then(x => toCamelCase(x)),
|
.then(x => toCamelCase(x)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateInviteFromChannel extends RESTPostAPIChannelInviteJSONBody {
|
export interface CreateInviteFromChannel extends RESTPostAPIChannelInviteJSONBody {
|
||||||
channelId: string;
|
channelId: string;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user