Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wikipedia: use say() instead of reply() when reporting a URL error #2315

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

SnoopJ
Copy link
Contributor

@SnoopJ SnoopJ commented Jul 12, 2022

Description

This PR removes user highlights bot.reply() from the wikipedia plugin, in favor of the non-highlighting bot.say()

Note: this PR is motivated by a personal opinion about netiquette; a user sharing a Wikipedia URL may not even know the Sopel instance exists, and the bot highlighting them is the kind of thing I consider a bit of an aggravation. Feel free to close this PR on that basis 😅

Existing behavior

16:33 <SnoopJ> https://en.wikipedia.org/wiki/Diffraction_spike#/media/File:Comparison_strut_diffraction_spikes.svg
16:33 <terribot> SnoopJ: Error fetching section "/media/File:Comparison_strut_diffraction_spikes.svg" for page "Diffraction spike".

Behavior with this patch

16:34 <SnoopJ> https://en.wikipedia.org/wiki/Diffraction_spike#/media/File:Comparison_strut_diffraction_spikes.svg
16:34 <terribot> [wikipedia] Error fetching section "/media/File:Comparison_strut_diffraction_spikes.svg" for page "Diffraction spike".

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches

@dgw
Copy link
Member

dgw commented Jul 14, 2022

I think IRC discussion yesterday established that this is desirable for URL-triggered calls only. A command that results in an error should still reply().

See the xkcd and reddit plugins for examples of other core plugins that respond differently depending on trigger type. (reddit, in particular, simply doesn't respond if e.g. an inline u/name reference points to an invalid entity.)

sopel/modules/wikipedia.py Outdated Show resolved Hide resolved
sopel/modules/wikipedia.py Outdated Show resolved Hide resolved
@dgw dgw changed the title Use say() instead of reply() when reporting a Wiki[pm]edia error Use say() instead of reply() when reporting a Wikipedia error Jul 15, 2022
@dgw dgw added this to the 8.0.0 milestone Jul 15, 2022
@dgw dgw added the Tweak label Jul 15, 2022
@dgw
Copy link
Member

dgw commented Jul 15, 2022

This is good to squash down, IMO. Note our commit message convention, which would go something like this for this PR:

wikipedia: use say() instead of reply() when reporting a URL error

@SnoopJ SnoopJ force-pushed the feature/polite-wikipedia-error branch from 3265dd4 to 103e9c8 Compare July 22, 2022 20:31
@dgw dgw changed the title Use say() instead of reply() when reporting a Wikipedia error wikipedia: use say() instead of reply() when reporting a URL error Jul 24, 2022
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one told you I prefer not to actually rebase onto master during squash if possible, because it makes verifying that the PR contains no extra changes easier, but this patch is small enough that it's nbd.

@dgw dgw merged commit 0f7bcdd into sopel-irc:master Jul 24, 2022
@SnoopJ SnoopJ deleted the feature/polite-wikipedia-error branch July 24, 2022 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants