| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
Replaced `TimeoutError` with `asyncio.TimeoutError`.
|
| |
|
|
|
|
| |
The "unsilence" action of the silence/hush command used `send_messages=True` when unsilencing a hushed channel. This had the side effect of also enabling send messages permissions for those with the Muted rule, as an explicit True permission apparently overwrites an explicit False permission, even if the latter was set for a higher top-role.
The solution is to revert back to the `Inherit` permission by assigning `None`. This is what we normally use when Developers are allowed to send messages to a channel.
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| | |
Should return 1st arg (or None) if eval cmd in message, otherwise return
full content.
|
| | | |
|
| | |
| |
| |
| |
| | |
The tasks extensions loop requires an event loop to exist. To work
around this, it's been mocked.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
discord.py yields duplicate Command objects for each alias a command
has, so the duplicates need to be removed on our end.
|
| | |
| |
| |
| |
| | |
* Rename `walk_extensions` to `walk_modules` because some extensions
don't consist of a single module
|
| | |
| |
| |
| | |
Have to check the modules are equal to prevent yielding imported cogs.
|
| | | |
|
| | |
| |
| |
| | |
This will help reduce nesting in the actual test.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
For tests, ideally creating instances of cogs should be avoided to avoid
extra code execution. This function was copied over from discord.py
because their function is not a static method, though it still works as
one. It was probably just a design decision on their part to not make it
static.
|
| | | |
|
| | |\ |
|
| | | | |
|
| | | |
| | |
| | | |
This was added by the now-removed Snake cog & is not used elsewhere on bot.
|
| | | |
| | |
| | |
| | |
| | | |
* Remove trailing whitespaces
* Specify error code for a noqa in the free command
|
| | | |
| | |
| | |
| | | |
role(s)" due changes in command.
|
| | | | |
|
| | |\| |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Discard ignores non present values,
allowing us to skip the KeyError suppress.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
`removed` was describing the opposite behaviour.
|
| | | |
| | |
| | |
| | |
| | | |
After removing the optional channel arg and
changing output message channels we're only testing `ctx`'s `send`.
|
| | | |
| | |
| | |
| | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | |
| | |
| | |
| | | |
Previous names were undescriptive from testing phases.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
The first assert - `asyncio_mock.create_task.assert_called_once_with`
called `alert_channel`'s send resulting in an extra call.
`send` on `alert_channel` was not tested properly because of a typo
and a missing assert in the method call.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
`.set_permissions` calls were changed to use kwargs directly instead of an overwrite,
this reflects the changes in tests.
|
| | | |
| | |
| | |
| | |
| | | |
The FirstHash class is no longer necessary with only channels and the current loop in tuples.
FirstHash was removed, along with its tests and tests were adjusted for new dict behaviour.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Creating a new object caused the assert to fail because different objects were used.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
`assert_called_once_with` was being tested on call_args which always reported success.st.
|
| | | | |
|
| | | | |
|