🎨 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
This commit is contained in:
Flam3rboy committed 2021-06-22 18:41:21 +02:00
1 parent 4c0c09c8bc
commit bb0dec2a9f
5 files changed
+44 -44

No files matched your search

+2 -2
View File
@@ -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 {