@@ -28,7 +28,7 @@ def __init__(
2828        enable_accept_solutions : bool  =  False ,
2929        enable_mark_as_solved : bool  =  False ,
3030        finished : bool  =  False ,
31-         failed : bool  =  False 
31+         failed : bool  =  False , 
3232    ):
3333        self .forum : int  =  forum 
3434        self .tag_list : list [tuple [int , str ]] =  []
@@ -47,7 +47,7 @@ def __init__(
4747        forum : int  =  None ,
4848        tag_message : str  =  None ,
4949        custom_msg : str  =  None ,
50-         db : PostAssistDB  =  None 
50+         db : PostAssistDB  =  None , 
5151    ):
5252        super ().__init__ (timeout = 480 )
5353        self .db  =  db 
@@ -189,17 +189,32 @@ async def enable(self, interaction: Interaction, button: Button):
189189        )
190190
191191        enable_mark_as_solved_button  =  PostAssistEnableMarkAsSolvedButton (self .state )
192-         await  interaction .followup .send ("Enable Mark as Solved feature?" , view = enable_mark_as_solved_button , ephemeral = True )
192+         await  interaction .followup .send (
193+             "Enable Mark as Solved feature?" ,
194+             view = enable_mark_as_solved_button ,
195+             ephemeral = True ,
196+         )
193197        await  enable_mark_as_solved_button .wait ()
194198        self .stop ()
195199
196200    @button (label = "No" ) 
197201    async  def  disable (self , interaction : Interaction , button : Button ):
198202        self .state .enable_accept_solutions  =  False 
199203        self .state .finished  =  True 
200-         await  interaction .response .send_message ("Accept solutions disabled." , ephemeral = True )
204+         await  interaction .response .send_message (
205+             "Accept solutions disabled." , ephemeral = True 
206+         )
207+ 
208+         enable_mark_as_solved_button  =  PostAssistEnableMarkAsSolvedButton (self .state )
209+         await  interaction .followup .send (
210+             "Enable Mark as Solved feature?" ,
211+             view = enable_mark_as_solved_button ,
212+             ephemeral = True ,
213+         )
214+         await  enable_mark_as_solved_button .wait ()
201215        self .stop ()
202216
217+ 
203218class  PostAssistEnableMarkAsSolvedButton (View ):
204219    def  __init__ (self , options : PostAssistState ):
205220        super ().__init__ (timeout = 480 )
@@ -212,17 +227,22 @@ async def enable_mark_as_solved(self, interaction: Interaction, button: Button):
212227        self .state .enable_mark_as_solved  =  True 
213228        self .state .finished  =  True 
214229
215-         await  interaction .followup .send ("Mark as solved will be enabled." , ephemeral = True )
230+         await  interaction .followup .send (
231+             "Mark as solved will be enabled." , ephemeral = True 
232+         )
216233
217234        self .stop ()
218235
219236    @button (label = "No" ) 
220237    async  def  disable_mark_as_solved (self , interaction : Interaction , button : Button ):
221238        self .state .enable_mark_as_solved  =  False 
222239        self .state .finished  =  True 
223-         await  interaction .response .send_message ("Mark as solved disabled." , ephemeral = True )
240+         await  interaction .response .send_message (
241+             "Mark as solved disabled." , ephemeral = True 
242+         )
224243        self .stop ()
225244
245+ 
226246class  ConfigurationPagination (View ):
227247    def  __init__ (self , data : list [dict ], getter : Callable ):
228248        self .data  =  data 
@@ -258,29 +278,26 @@ async def next(self, interaction: Interaction, button: Button):
258278            view = self ,
259279        )
260280
281+ 
261282def  get_forums (db : Settings , guild : Guild ) ->  View :
262283    """Gets all forums.""" 
263284
264285    async  def  select_callback (interaction : Interaction ):
265286        await  db .set_setting ("dev_help_forum" , int (forum_selection .values [0 ]))
266-         await  interaction .response .edit_message (
267-             content = f"Success..." ,
268-             view = None 
269-         )
287+         await  interaction .response .edit_message (content = f"Success..." , view = None )
270288        view .stop ()
271289
272290    view  =  View ()
273291    forum_selection  =  Select (placeholder = "Select Forum..." )
274292    forum_selection .callback  =  select_callback 
275293
276294    for  forum  in  guild .forums :
277-         forum_selection .add_option (
278-             label = forum .name , value = str (forum .id )
279-         )
295+         forum_selection .add_option (label = forum .name , value = str (forum .id ))
280296
281297    view .add_item (forum_selection )
282298    return  view 
283299
300+ 
284301def  format_data (data : dict , guild : Guild , getter : Callable ):
285302    forum  =  guild .get_channel (data ["forum_id" ])
286303    tags  =  data ["tags" ]
0 commit comments