@@ -140,20 +140,24 @@ def __init__(
140140 invite_track = []
141141
142142 if isinstance (include_pattern , str ):
143+ include_pattern = regex (re .sub (r"\s*\|\s*" , '' , include_pattern ))
143144 trace (
144- "Using text (str) on 'include_pattern' parameter of AutoGUILD is deprecated (planned for removal in 4.2.0)!\n "
145- "Use logical operators instead (daf.logic). E. g., regex, contains, or_, ...\n " ,
146- TraceLEVELS .DEPRECATED
145+ "Using text (str) on 'include_pattern' parameter of AutoGUILD is deprecated and has been removed!\n "
146+ "Use logical operators instead (daf.logic). E. g., regex, contains, or_, ...\n "
147+ f"E. g., use { include_pattern .__class__ } as the include_pattern parameter." ,
148+ TraceLEVELS .ERROR ,
149+ exception_cls = TypeError
147150 )
148- include_pattern = regex (re .sub (r"\s*\|\s*" , '' , include_pattern ))
149151
150152 if exclude_pattern is not None :
151- trace (
152- "'exclude_pattern' parameter is deprecated (planned for removal in 4.2.0)!\n " ,
153- TraceLEVELS .DEPRECATED
154- )
155153 exclude_pattern = regex (re .sub (r"\s*\|\s*" , '' , exclude_pattern ))
156154 include_pattern = and_ (include_pattern , not_ (exclude_pattern ))
155+ trace (
156+ "'exclude_pattern' parameter is deprecated and has been removed!\n "
157+ f"Use { include_pattern .__class__ } instead at the include_pattern parameter." ,
158+ TraceLEVELS .ERROR ,
159+ exception_cls = NameError
160+ )
157161
158162 self .include_pattern = include_pattern
159163 self ._remove_after = remove_after
@@ -163,7 +167,8 @@ def __init__(
163167 if auto_join is not None : # TODO: remove in future after feature is reenabled.
164168 auto_join = None
165169 trace (
166- "Automatic join feature is currently disabled and will not work. It will be reenabled in a future version." ,
170+ "Automatic join feature is currently disabled and will not work. It will be reenabled in a future version\n "
171+ "when a suitable new server provider is found" ,
167172 TraceLEVELS .WARNING
168173 )
169174
@@ -443,9 +448,7 @@ async def _on_update(self, _, init_options, **kwargs):
443448 if "invite_track" not in kwargs :
444449 kwargs ["invite_track" ] = list (self ._invite_join_count .keys ())
445450
446- if "exclude_pattern" not in kwargs : # DEPRECATED; TODO: remove in 4.2.0
447- kwargs ["exclude_pattern" ] = None
448-
451+ kwargs ["exclude_pattern" ] = None
449452 kwargs ["messages" ] = kwargs .pop ("messages" , self ._messages )
450453 if init_options is None :
451454 init_options = {"parent" : self .parent , "event_ctrl" : self ._event_ctrl }
0 commit comments