seyfert
Version:
The most advanced framework for discord bots
37 lines (36 loc) • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvitesShorter = void 0;
const utils_1 = require("../it/utils");
const base_1 = require("./base");
class InvitesShorter extends base_1.BaseShorter {
get(code) {
return this.client.proxy
.invites(code)
.get()
.then(x => (0, utils_1.toCamelCase)(x));
}
delete(code, reason) {
return this.client.proxy
.invites(code)
.delete({ reason })
.then(x => (0, utils_1.toCamelCase)(x));
}
channels = {
create: ({ channelId, reason, ...body }) => this.client.proxy
.channels(channelId)
.invites.post({ body, reason })
.then(x => (0, utils_1.toCamelCase)(x)),
list: (channelId) => this.client.proxy
.channels(channelId)
.invites.get()
.then(x => (0, utils_1.toCamelCase)(x)),
};
guilds = {
list: (guildId) => this.client.proxy
.guilds(guildId)
.invites.get()
.then(x => (0, utils_1.toCamelCase)(x)),
};
}
exports.InvitesShorter = InvitesShorter;