| Commit message (Collapse) | Author | Age | Lines |
... | |
| |\ \ \
| | | | |
| | | | | |
Add custom command checks tag
|
| | |\ \ \
| | |/ / /
| |/| | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| |\ \ \
| | | | |
| | | | | |
Branding: correct broken timestamp persistence & improve cosmetics
|
| | |\ \ \
| | |/ / /
| |/| | | |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
python-discord/bug/filters/902/antispam-punish-once
AntiSpam: prevent attempts to punish a user multiple times
|
| | |\ \ \ \
| | |/ / / /
| |/| | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Use a paginated embed to output multiple snowflakes
|
| | |\ \ \ \ \
| | |/ / / / /
| |/| | | | | |
|
| |\ \ \ \ \ \
| | |_|_|_|_|/
| |/| | | | | |
Catch NotFound errors when trying to delete the invocation message when cleaning
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Name the tasks and use `scheduling.create_task` to ensure exceptions
are caught.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A user may manage to send multiple message that violate filters before
the mute is applied. Because of a race condition, subsequent punish
attempts did not detect the mute role exists and therefore proceeded
to apply another mute.
To avoid the race condition, abort any subsequent punish attempts while
one is already ongoing for a given user. It could be possible to wait
instead of abort, but the first attempt failing very likely means
subsequent attempts would fail too.
Fixes #902
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| |\ \ \
| | | | |
| | | | | |
Use == instead of str.startswith when getting the source for a Command
|
| | |\ \ \
| | |/ / /
| |/| | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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]>
|
| |\ \ \ \ |
|
| | |\ \ \ \
| | |/ / / /
| |/| | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The meaning of 'moved' may not have been clear for people that weren't familiar
with how the system works
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | |
| | | | | |
| | | | | | |
Co-authored-by: Kieran Siek <[email protected]>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A base url without a trailing slash won't join properly with the relative
paths, raising an error my prevent some mistakes when a new inventory is added
|
| | |\ \ \ \ |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
shorten collapses the whitespace, causing issues with codeblocks
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Moving the block handling the fetching into a separate method meant that
symbol_name was no longer updated inside the create_symbol_embed method, causing
the whole message to be included in the embed title in case the space shortcut
was used
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously the code used limits that apply to raw messages, not embeds.
Both the description and footer limits are separate, while their
individual limits are 2048 chars instead of 2000.
The footer overhead was removed from the max description length
and the footer is now truncated to 200 chars which is roughly 2 lines
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
While the previous code was safe, the synchronization was spread out
over different modules and was hard to wrap around. Additionally changes
could introduce context switches without the author being aware of them
causing potential race conditions with the refresh.
Moving the whole body into the with block solves both of these issues
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Tests for this were added additionally
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
After the move to a separate method, the docstring now documents the
behaviour so a comment is unnecessary
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The method was also renamed from get_symbol_embed to create_symbol_embed
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The tests were not adjusted after the converter was corrected to accept
digits
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|