diff options
author | 2022-02-22 22:15:19 +0200 | |
---|---|---|
committer | 2022-07-16 02:07:25 +0300 | |
commit | d1ae7ce9235e4d63ee1dde282ca890ac5509f950 (patch) | |
tree | 236cc81b3f6574c3a75e737c4bc9b3926c91a55e /tests/helpers.py | |
parent | Add listing commands (diff) |
Accept strings in channel scope and change role string interpretation
The channel scope settings were changed to accomodate strings. That means that if a string is specified, the bot will look whether the context channel's name matches. If it's a number, it will match the ID.
Accordingly the same changed was applied to the bypass roles and pings settings: if it's a non-numeric string, it will look for a role with that name.
Diffstat (limited to 'tests/helpers.py')
-rw-r--r-- | tests/helpers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index 17214553c..e74306d23 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -423,7 +423,7 @@ category_channel_instance = discord.CategoryChannel( class MockCategoryChannel(CustomMockMixin, unittest.mock.Mock, HashableMixin): def __init__(self, **kwargs) -> None: default_kwargs = {'id': next(self.discord_id)} - super().__init__(**collections.ChainMap(default_kwargs, kwargs)) + super().__init__(**collections.ChainMap(kwargs, default_kwargs)) # Create a Message instance to get a realistic MagicMock of `discord.Message` |