refactor(handlers/guild): rename guild widget functions (#386)

* Update guild.ts

* Update guild.ts

* this should be named getWidgetSettings

* update mod imports
This commit is contained in:
ITOH
2021-03-08 15:51:12 +01:00
committed by GitHub
parent ebc48156aa
commit 42c743421b
2 changed files with 8 additions and 5 deletions
+4 -4
View File
@@ -694,8 +694,8 @@ export async function getAuditLogs(
return result;
}
/** Returns the guild embed object. Requires the MANAGE_GUILD permission. */
export async function getEmbed(guildID: string) {
/** Returns the guild widget object. Requires the MANAGE_GUILD permission. */
export async function getWidgetSettings(guildID: string) {
const hasPerm = await botHasPermission(guildID, ["MANAGE_GUILD"]);
if (!hasPerm) {
throw new Error(Errors.MISSING_MANAGE_GUILD);
@@ -706,8 +706,8 @@ export async function getEmbed(guildID: string) {
return result;
}
/** Modify a guild embed object for the guild. Requires the MANAGE_GUILD permission. */
export async function editEmbed(
/** Modify a guild widget object for the guild. Requires the MANAGE_GUILD permission. */
export async function editWidget(
guildID: string,
enabled: boolean,
channelID?: string | null,