| Commit message (Collapse) | Author | Lines |
|
Duplicates existing silence and unsilence cache tests for voice
channels.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
Reduces the number of members created for each test to the bare minimum
required.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
This allows mod alert pings to go through in #mod-alerts, the allowed mentions only included the mods team role which is not pinged on mod alerts.
|
|
The modlog alert embed no longer pings everyone.
|
|
Co-authored-by: ChrisJL <[email protected]>
|
|
The `tests/README.md` file still referenced our old custom `AsyncMock` that has been removed in favour of the standard library one that has been introduced in 3.8. This commit fixes this by updating the section.
|
|
Co-authored-by: Boris Muratov <[email protected]>
|
|
|
|
|
|
Co-authored-by: Rohan Reddy Alleti <[email protected]>
|
|
|
|
|
|
Co-authored-by: Matteo Bertucci <[email protected]>
|
|
|
|
|
|
This is useful to audit users who still have the permission to stream. I have chosen to also
sort and paginate the embed to make it easier to read. The sorting is based on how long until
the user's streaming permissions are revoked, with permanent streamers at the end.
|
|
Previously any staff member (including helpers) could use the stream commands.
|
|
Negative indexing starts at -1, not 0, meaning lower bound should be -1 * len(zen_lines), not -1 * upper_bound.
|
|
|
|
The renaming includes the commands inside it.
|
|
|
|
|
|
|
|
|
|
Kinda defeats the purpose of being off-duty.
|
|
|
|
|
|
The lack of such a task may be indicative of a bug.
|
|
A moderator is expected to have the mod-team role and therefore it's enough to specify the latter in the mod and staff roles.
|
|
This creates a new baseclass called ContextCheckFailure, and the new error as well as InWhitelistCheckFailure now derive it.
|
|
Adds a check to blacklist a command only in a specific context, with an option for a role override. The check is applied to the eval command to blacklist it only from python-general.
|
|
|
|
|
|
|
|
|
|
Co-authored-by: ks129 <[email protected]>
|
|
Added a cog to allow moderators to go off and on duty.
The off-duty state is cached via a redis cache, and its expiry is scheduled via the Scheduler.
Additionally changes which roles are pinged on mod alerts.
|
|
|
|
This often happens during a raid, when an int e script is added to ban & clean messages. Since the invocation
message will be deleted on the first run, we should except subsequent NotFound errors.
|
|
|
|
Previously each snowflake passed to the command would have their own embed, which may cause
the bot to send many embeds if a staff unknowingly passed it a bunch of snowflakes. This change
makes sure that we don't run into rate limits on the bot by sending all of the snowflakes in one embed.
|
|
Instead of:
'January 1 - January 1'
Do:
'January 1'
|
|
Using `datetime.utcnow` produces a tz-naive object. When converting
the object into a POSIX timestamp (L212), the library then converts
the naive object into UTC, which will offset it unless the local
timezone is UTC. We prevent this behaviour by using an Arrow repr
instead, which is by default tz-aware. Since the object already
knows it is in UTC, it does not shift when converting to a timestamp.
Because L233 used `fromtimestamp` rather than `utcfromtimestamp`,
the timestamp then got converted back into local time, canceling
the previous error. Therefore, the bug wasn't observable from logs,
as the times looked correct, but were being stored incorrectly.
By using `Arrow.utcfromtimestamp`, the created object will be aware
of being UTC again, which is more safe.
|
|
reaction. (#1471)
* Remove reactions from everyone
* Make flake8 happy
* Make flake8 happy again
* Remove reactions in check functions
* Make flake8 happy for the last time
* Update bot/pagination.py
Co-authored-by: Kieran Siek <[email protected]>
* Make create_task one line and return False in checks
* Fix return so it returns either True or False
* Use scheduling.create_task and suppress HTTPException
* Suppress HTTPException in scheduling.create_task
* Remove double if-statements
Co-authored-by: Mark <[email protected]>
* change suppress_exceptions to suppressed_exceptions
* Make suppressed_exceptions a kwargs for _log_task_exception
* Update scheduling.create_task call to correspond with *args
* Fix NameError: reaction, user -> reaction_, user_
* Update scheduling.create_task call to correspond with *args in messages.wait_for_deletion
* reaction -> reaction_
* Ignore reactions from the bot
* Fix type annotations for create_task
* Refactor add_reaction check to a separate function
* Name the remove_reaction task
Co-authored-by: Kieran Siek <[email protected]>
Co-authored-by: Mark <[email protected]>
|
|
|
|
|
|
Install the regex package to take advantage of its support for Unicode
categories.
|
|
|
|
Name the tasks and use `scheduling.create_task` to ensure exceptions
are caught.
|