Merge branch 'main' of https://github.com/discordeno/discordeno into buttons-dropdowns

This commit is contained in:
Skillz
2021-05-01 08:20:04 -04:00
237 changed files with 630 additions and 997 deletions
@@ -1,9 +1,8 @@
import { rest } from "../../rest/rest.ts";
import { endpoints } from "../../util/constants.ts";
/** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event.
*/
export async function deleteServer(guildId: string) {
/** Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event. */
export async function deleteGuild(guildId: string) {
return await rest.runMethod<undefined>(
"delete",
endpoints.GUILDS_BASE(guildId),
+1 -1
View File
@@ -12,5 +12,5 @@ export async function getWidget(guildId: string, options?: { force: boolean }) {
if (!guild?.widgetEnabled) throw new Error(Errors.GUILD_WIDGET_NOT_ENABLED);
}
return await rest.runMethod("get", `${endpoints.GUILD_WIDGET(guildId)}.json`) as GuildWidgetDetails;
return await rest.runMethod<GuildWidgetDetails>("get", `${endpoints.GUILD_WIDGET(guildId)}.json`);
}