mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
feat(handlers): add getGuildPreview() (#408)
* add(handlers): getGuildPreview * update comment * check if guild is discoverable * remove checking since getGuild does not work on unjoined guilds
This commit is contained in:
@@ -689,6 +689,11 @@ export async function unban(guildID: string, id: string) {
|
||||
return RequestManager.delete(endpoints.GUILD_BAN(guildID, id));
|
||||
}
|
||||
|
||||
/** Returns the guild preview object for the given id. If the bot is not in the guild, then the guild must be Discoverable. */
|
||||
export function getGuildPreview(guildID: string) {
|
||||
return RequestManager.get(endpoints.GUILD_PREVIEW(guildID));
|
||||
}
|
||||
|
||||
/** Modify a guilds settings. Requires the MANAGE_GUILD permission. */
|
||||
export async function editGuild(guildID: string, options: GuildEditOptions) {
|
||||
const hasPerm = await botHasPermission(guildID, ["MANAGE_GUILD"]);
|
||||
|
||||
Reference in New Issue
Block a user