|
21 | 21 | from urllib3.exceptions import LocationValueError # type: ignore[import] |
22 | 22 |
|
23 | 23 | from sopel import plugin, tools |
24 | | -from sopel.bot import Sopel |
| 24 | +from sopel.bot import Sopel, SopelWrapper |
25 | 25 | from sopel.config import Config, types |
26 | 26 | from sopel.tools import web |
27 | 27 | from sopel.trigger import Trigger |
@@ -149,7 +149,7 @@ def shutdown(bot: Sopel): |
149 | 149 | @plugin.example('.urlpexclude example\\.com/\\w+', user_help=True) |
150 | 150 | @plugin.example('.urlexclude example.com/path', user_help=True) |
151 | 151 | @plugin.output_prefix('[url] ') |
152 | | -def url_ban(bot: Sopel, trigger: Trigger): |
| 152 | +def url_ban(bot: SopelWrapper, trigger: Trigger): |
153 | 153 | """Exclude a URL from auto title. |
154 | 154 |
|
155 | 155 | Use ``urlpexclude`` to exclude a pattern instead of a URL. |
@@ -194,7 +194,7 @@ def url_ban(bot: Sopel, trigger: Trigger): |
194 | 194 | @plugin.example('.urlpallow example\\.com/\\w+', user_help=True) |
195 | 195 | @plugin.example('.urlallow example.com/path', user_help=True) |
196 | 196 | @plugin.output_prefix('[url] ') |
197 | | -def url_unban(bot: Sopel, trigger: Trigger): |
| 197 | +def url_unban(bot: SopelWrapper, trigger: Trigger): |
198 | 198 | """Allow a URL for auto title. |
199 | 199 |
|
200 | 200 | Use ``urlpallow`` to allow a pattern instead of a URL. |
@@ -241,7 +241,7 @@ def url_unban(bot: Sopel, trigger: Trigger): |
241 | 241 | 'Google | www.google.com', |
242 | 242 | online=True, vcr=True) |
243 | 243 | @plugin.output_prefix('[url] ') |
244 | | -def title_command(bot: Sopel, trigger: Trigger): |
| 244 | +def title_command(bot: SopelWrapper, trigger: Trigger): |
245 | 245 | """ |
246 | 246 | Show the title or URL information for the given URL, or the last URL seen |
247 | 247 | in this channel. |
@@ -281,7 +281,7 @@ def title_command(bot: Sopel, trigger: Trigger): |
281 | 281 |
|
282 | 282 | @plugin.rule(r'(?u).*(https?://\S+).*') |
283 | 283 | @plugin.output_prefix('[url] ') |
284 | | -def title_auto(bot: Sopel, trigger: Trigger): |
| 284 | +def title_auto(bot: SopelWrapper, trigger: Trigger): |
285 | 285 | """ |
286 | 286 | Automatically show titles for URLs. For shortened URLs/redirects, find |
287 | 287 | where the URL redirects to and show the title for that (or call a function |
|
0 commit comments