Skip to content

Commit d3bd23e

Browse files
committed
Fixed spaces
VERSION
1 parent 9358970 commit d3bd23e

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

docs/source/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ Glossary
3131
----------------------
3232
Releases
3333
----------------------
34+
35+
v2.9.3
36+
=================
37+
- Fixed :class:`AutoGUILD` and :class:`AutoCHANNEL` regex patterns. Users can now seperate names with "name1 | name2",
38+
instead of "name1|name2". `#380 <https://github.com/davidhozic/discord-advertisement-framework/issues/380>`_
39+
3440
v2.9.2
3541
=================
3642
- Fixed viewing dictionaries inside the GUI

src/daf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
from .misc import *
2020

2121

22-
VERSION = "2.9.2"
22+
VERSION = "2.9.3"

src/daf/guild.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,9 @@ def __init__(self,
842842
interval: Optional[timedelta] = timedelta(minutes=1),
843843
auto_join: Optional[web.GuildDISCOVERY] = None,
844844
invite_track: Optional[List[str]] = None) -> None:
845-
self.include_pattern = include_pattern
846-
self.exclude_pattern = exclude_pattern
845+
# Remove spaces around OR
846+
self.include_pattern = re.sub(r"\s*\|\s*", '|', include_pattern) if include_pattern else None
847+
self.exclude_pattern = re.sub(r"\s*\|\s*", '|', exclude_pattern) if exclude_pattern else None
847848
self.remove_after = remove_after
848849
self.invite_track = invite_track
849850
# Uninitialized template messages that get copied for each found guild.

src/daf/message/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,9 @@ def __init__(self,
443443
include_pattern: str,
444444
exclude_pattern: Optional[str] = None,
445445
interval: Optional[timedelta] = timedelta(minutes=5)) -> None:
446-
self.include_pattern = include_pattern
447-
self.exclude_pattern = exclude_pattern
446+
# Remove spaces around OR
447+
self.include_pattern = re.sub(r"\s*\|\s*", '|', include_pattern) if include_pattern else None
448+
self.exclude_pattern = re.sub(r"\s*\|\s*", '|', exclude_pattern) if exclude_pattern else None
448449
self.interval = interval
449450
self.parent = None
450451
self.channel_getter: property = None

0 commit comments

Comments
 (0)