@@ -53,8 +53,12 @@ export default class ServerSuggestionTracker extends BotComponent {
5353 private server_suggestions : Discord . TextChannel ;
5454
5555 override async setup ( commands : CommandSetBuilder ) {
56- this . suggestion_action_log = await this . wheatley . client . channels . fetch ( this . wheatley . channels . suggestion_action_log ) as Discord . ThreadChannel ;
57- this . suggestion_dashboard = await this . wheatley . client . channels . fetch ( this . wheatley . channels . suggestion_dashboard ) as Discord . ThreadChannel ;
56+ this . suggestion_action_log = ( await this . wheatley . client . channels . fetch (
57+ this . wheatley . channels . suggestion_action_log ,
58+ ) ) as Discord . ThreadChannel ;
59+ this . suggestion_dashboard = ( await this . wheatley . client . channels . fetch (
60+ this . wheatley . channels . suggestion_dashboard ,
61+ ) ) as Discord . ThreadChannel ;
5862 this . server_suggestions = await this . utilities . get_channel ( this . wheatley . channels . server_suggestions ) ;
5963 commands . add (
6064 new TextBasedCommandBuilder ( "suggestions-dashboard-count" , EarlyReplyMode . visible )
@@ -256,9 +260,7 @@ export default class ServerSuggestionTracker extends BotComponent {
256260 try {
257261 const entry = unwrap ( await this . database . server_suggestions . findOne ( { suggestion : message_id } ) ) ;
258262 M . log ( "Suggestion deleted" , message_id , entry ) ;
259- const status_message = await this . suggestion_dashboard . messages . fetch (
260- entry . status_message ,
261- ) ;
263+ const status_message = await this . suggestion_dashboard . messages . fetch ( entry . status_message ) ;
262264 this . status_lock . insert ( entry . status_message ) ;
263265 await status_message . delete ( ) ;
264266 await this . database . server_suggestions . deleteOne ( { suggestion : message_id } ) ;
@@ -273,9 +275,7 @@ export default class ServerSuggestionTracker extends BotComponent {
273275 const hash = xxh3 ( message . content ) ;
274276 if ( hash != entry . hash ) {
275277 M . log ( "Suggestion edited" , message . author . tag , message . author . id , message . url ) ;
276- const status_message = await this . suggestion_dashboard . messages . fetch (
277- entry . status_message ,
278- ) ;
278+ const status_message = await this . suggestion_dashboard . messages . fetch ( entry . status_message ) ;
279279 const quote = await this . make_embeds ( message ) ;
280280 await status_message . edit ( quote ) ;
281281 entry . hash = hash ;
@@ -293,9 +293,7 @@ export default class ServerSuggestionTracker extends BotComponent {
293293 message . author . id ,
294294 message . url ,
295295 ) ;
296- const status_message = await this . suggestion_dashboard . messages . fetch (
297- entry . status_message ,
298- ) ;
296+ const status_message = await this . suggestion_dashboard . messages . fetch ( entry . status_message ) ;
299297 const quote = await this . make_embeds ( message ) ;
300298 await status_message . edit ( quote ) ;
301299 entry . up = up ;
@@ -317,9 +315,7 @@ export default class ServerSuggestionTracker extends BotComponent {
317315 if ( entry ) {
318316 M . log ( "Suggestion being resolved" , [ message . id ] ) ;
319317 // remove status message
320- const status_message = await this . suggestion_dashboard . messages . fetch (
321- entry . status_message ,
322- ) ;
318+ const status_message = await this . suggestion_dashboard . messages . fetch ( entry . status_message ) ;
323319 this . status_lock . insert ( entry . status_message ) ;
324320 await status_message . delete ( ) ;
325321 await this . database . server_suggestions . deleteOne ( { suggestion : message . id } ) ;
@@ -452,9 +448,7 @@ export default class ServerSuggestionTracker extends BotComponent {
452448 if ( entry ) {
453449 M . debug ( "Suggestion vote" , reaction . emoji . name , [ message . id ] ) ;
454450 // update message
455- const status_message = await this . suggestion_dashboard . messages . fetch (
456- entry . status_message ,
457- ) ;
451+ const status_message = await this . suggestion_dashboard . messages . fetch ( entry . status_message ) ;
458452 const quote = await this . make_embeds ( message ) ;
459453 await status_message . edit ( quote ) ;
460454 if ( reaction . emoji . name == "👍" ) {
@@ -714,8 +708,7 @@ export default class ServerSuggestionTracker extends BotComponent {
714708 // check if the status message was deleted (if we didn't just delete it with resolve_suggestion)
715709 if (
716710 ! suggestion_was_resolved &&
717- ( await this . get_message ( this . suggestion_dashboard , entry . status_message ) ) ==
718- undefined
711+ ( await this . get_message ( this . suggestion_dashboard , entry . status_message ) ) == undefined
719712 ) {
720713 // just delete from this.database - no longer tracking
721714 M . info (
0 commit comments