@@ -1084,8 +1084,8 @@ def __init__(
10841084 title : str ,
10851085 content : str ,
10861086 message : Message ,
1087- topic_links : Dict [str , Tuple [str , int , bool ]],
1088- message_links : Dict [str , Tuple [str , int , bool ]],
1087+ topic_links : Dict [str , Tuple [str , int , bool , bool ]],
1088+ message_links : Dict [str , Tuple [str , int , bool , bool ]],
10891089 time_mentions : List [Tuple [str , str ]],
10901090 spoilers : List [Tuple [int , List [Any ], List [Any ]]],
10911091 ) -> None :
@@ -1609,8 +1609,8 @@ def __init__(
16091609 controller : Any ,
16101610 msg : Message ,
16111611 title : str ,
1612- topic_links : Dict [str , Tuple [str , int , bool ]],
1613- message_links : Dict [str , Tuple [str , int , bool ]],
1612+ topic_links : Dict [str , Tuple [str , int , bool , bool ]],
1613+ message_links : Dict [str , Tuple [str , int , bool , bool ]],
16141614 time_mentions : List [Tuple [str , str ]],
16151615 spoilers : List [Tuple [int , List [Any ], List [Any ]]],
16161616 ) -> None :
@@ -1748,17 +1748,21 @@ def __init__(
17481748
17491749 @staticmethod
17501750 def create_link_buttons (
1751- controller : Any , links : Dict [str , Tuple [str , int , bool ]]
1751+ controller : Any , links : Dict [str , Tuple [str , int , bool , bool ]]
17521752 ) -> Tuple [List [MessageLinkButton ], int ]:
17531753 link_widgets = []
17541754 link_width = 0
17551755
17561756 for index , link in enumerate (links ):
1757- text , link_index , _ = links [link ]
1757+ text , link_index , _ , spoiler_link = links [link ]
17581758 if text :
17591759 caption = f"{ link_index } : { text } \n { link } "
1760+ if spoiler_link :
1761+ caption = f"{ link_index } [spoiler]: { text } \n { link } "
17601762 else :
17611763 caption = f"{ link_index } : { link } "
1764+ if spoiler_link :
1765+ caption = f"{ link_index } [spoiler]: { link } "
17621766 link_width = max (link_width , len (max (caption .split ("\n " ), key = len )))
17631767
17641768 display_attr = None if index % 2 else "popup_contrast"
@@ -1884,8 +1888,8 @@ def __init__(
18841888 self ,
18851889 controller : Any ,
18861890 message : Message ,
1887- topic_links : Dict [str , Tuple [str , int , bool ]],
1888- message_links : Dict [str , Tuple [str , int , bool ]],
1891+ topic_links : Dict [str , Tuple [str , int , bool , bool ]],
1892+ message_links : Dict [str , Tuple [str , int , bool , bool ]],
18891893 time_mentions : List [Tuple [str , str ]],
18901894 spoilers : List [Tuple [int , List [Any ], List [Any ]]],
18911895 title : str ,
@@ -2005,8 +2009,8 @@ def __init__(
20052009 self ,
20062010 controller : Any ,
20072011 message : Message ,
2008- topic_links : Dict [str , Tuple [str , int , bool ]],
2009- message_links : Dict [str , Tuple [str , int , bool ]],
2012+ topic_links : Dict [str , Tuple [str , int , bool , bool ]],
2013+ message_links : Dict [str , Tuple [str , int , bool , bool ]],
20102014 time_mentions : List [Tuple [str , str ]],
20112015 spoilers : List [Tuple [int , List [Any ], List [Any ]]],
20122016 title : str ,
@@ -2052,8 +2056,8 @@ def __init__(
20522056 self ,
20532057 controller : Any ,
20542058 message : Message ,
2055- topic_links : Dict [str , Tuple [str , int , bool ]],
2056- message_links : Dict [str , Tuple [str , int , bool ]],
2059+ topic_links : Dict [str , Tuple [str , int , bool , bool ]],
2060+ message_links : Dict [str , Tuple [str , int , bool , bool ]],
20572061 time_mentions : List [Tuple [str , str ]],
20582062 spoilers : List [Tuple [int , List [Any ], List [Any ]]],
20592063 title : str ,
0 commit comments