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
11 lines
350 B
TypeScript
11 lines
350 B
TypeScript
// 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
|
|
};
|
|
|
|
export interface WidgetModifySchema {
|
|
enabled: boolean; // whether the widget is enabled
|
|
channel_id: string; // the widget channel id
|
|
}
|