Skip to content

Commit

Permalink
squashme use sopelwrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
half-duplex committed May 16, 2022
1 parent e629693 commit 47cc9ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sopel/modules/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from urllib3.exceptions import LocationValueError # type: ignore[import]

from sopel import plugin, tools
from sopel.bot import Sopel
from sopel.bot import Sopel, SopelWrapper
from sopel.config import Config, types
from sopel.tools import web
from sopel.trigger import Trigger
Expand Down Expand Up @@ -149,7 +149,7 @@ def shutdown(bot: Sopel):
@plugin.example('.urlpexclude example\\.com/\\w+', user_help=True)
@plugin.example('.urlexclude example.com/path', user_help=True)
@plugin.output_prefix('[url] ')
def url_ban(bot: Sopel, trigger: Trigger):
def url_ban(bot: SopelWrapper, trigger: Trigger):
"""Exclude a URL from auto title.
Use ``urlpexclude`` to exclude a pattern instead of a URL.
Expand Down Expand Up @@ -194,7 +194,7 @@ def url_ban(bot: Sopel, trigger: Trigger):
@plugin.example('.urlpallow example\\.com/\\w+', user_help=True)
@plugin.example('.urlallow example.com/path', user_help=True)
@plugin.output_prefix('[url] ')
def url_unban(bot: Sopel, trigger: Trigger):
def url_unban(bot: SopelWrapper, trigger: Trigger):
"""Allow a URL for auto title.
Use ``urlpallow`` to allow a pattern instead of a URL.
Expand Down Expand Up @@ -241,7 +241,7 @@ def url_unban(bot: Sopel, trigger: Trigger):
'Google | www.google.com',
online=True, vcr=True)
@plugin.output_prefix('[url] ')
def title_command(bot: Sopel, trigger: Trigger):
def title_command(bot: SopelWrapper, trigger: Trigger):
"""
Show the title or URL information for the given URL, or the last URL seen
in this channel.
Expand Down Expand Up @@ -281,7 +281,7 @@ def title_command(bot: Sopel, trigger: Trigger):

@plugin.rule(r'(?u).*(https?://\S+).*')
@plugin.output_prefix('[url] ')
def title_auto(bot: Sopel, trigger: Trigger):
def title_auto(bot: SopelWrapper, trigger: Trigger):
"""
Automatically show titles for URLs. For shortened URLs/redirects, find
where the URL redirects to and show the title for that (or call a function
Expand Down

0 comments on commit 47cc9ad

Please sign in to comment.