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

Relax friend code tolerance #127

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from cogs.utils.checks import check_admin
from cogs.utils.utils import get_logger, get_prefix

__version__ = "1.2.0-dev"
__version__ = "1.1.2"
DOCS_URL = "placeholder"


Expand Down
2 changes: 1 addition & 1 deletion cogs/utils/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def check_for_friend_code(content: str) -> bool:
Returns:
'True' when the message contains a friend code. 'False' if not.
"""
pattern = re.compile(r"\d{4}.*\d{4}.*\d{4}(?!(\d*\>))")
pattern = re.compile(r"\d{4}.{0,2}\d{4}.{0,2}\d{4}(?!(\d*\>))")
content = snorlax_utils.strip_mentions(content)
content = snorlax_utils.strip_url(content)
match = re.search(pattern, content)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "officer-snorlax-bot"
version = "1.2.0-dev"
version = "1.1.2"
description = "Officer Snorlax Discord bot created to open and close channels on a schedule."
authors = ["Adam Stewart"]
license = "MIT"
Expand Down