From bb0dec2a9ff4467896356298dac6fa34fa314b9d Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 22 Jun 2021 18:41:21 +0200 Subject: :art: clean up code widget.json.ts: just return instead of long if statement + add ?. operators for error handling widget.png.ts make path universal widget.ts: remove unnecessary guild db query as getPermission already checks it Widget.ts make parameters required --- src/schema/Widget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/schema/Widget.ts') diff --git a/src/schema/Widget.ts b/src/schema/Widget.ts index 6a15a139..d37a38de 100644 --- a/src/schema/Widget.ts +++ b/src/schema/Widget.ts @@ -1,7 +1,7 @@ // https://discord.com/developers/docs/resources/guild#guild-widget-object export const WidgetModifySchema = { - $enabled: Boolean, // whether the widget is enabled - $channel_id: String // the widget channel id + enabled: Boolean, // whether the widget is enabled + channel_id: String // the widget channel id }; export interface WidgetModifySchema { -- cgit 1.5.1