| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- We're using a set comprehension and flipping the order for counting
the number of channels that are both staff allow and @everyone deny.
- We're breaking the staff channel count stuff into a separate helper
function so it doesn't crowd the server_info() scope.
These fixes are both to address the code review from @MarkKoz, thanks
Mark.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I wish this test didn't exist.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We now check:
- Does the @everyone role have explicit read deny permissions?
- Do staff roles have explicit read allow permissions?
If the answer to both of these are yes, it's a staff channel.
By 'staff roles', I mean Helpers, Moderators or Admins.
|
| | |\ \ \ \ \ \ \ \ |
|
| | | | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Cleaning up a particularly dirty line by turning it into like 10 lines,
and also adding the number of channels that are hidden to the
`@everyone` role - which we're classifying as "Staff channels".
|
| | | | | | | |_|_|/
| | | | | |/| | |
| | | | | | | | | |
Increase every shown rule uses count when command called.
|
| | |_|_|_|_|/ / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Not all channels will have a category attribute. This may be fine in
production, but it does cause periodic errors when testing locally.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add the !modmail tag
|
| |/ / / / / / / / |
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Remove all sending of avatar_hash
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| |_|_|_|_|/ / / /
|/| | | | | | | | |
Add multichannel !purge
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This ensures that only what was actually deleted will be uploaded.
I managed to get a 400 response from our API when purging twice in
quick succession. Searching the history manually for these messages is
unreliable cause of some sort of race condition.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We're removing the context manager due to async concerns, so we'll go
back to the old approach again of ignoring specific messages and
iterating history.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This reverts commit 0737b1a6
This isn't gonna work, because async is a thing.
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This command was written to support only a single channel, and with the
move to multi-channel purges, we need to rethink the way the invocation
deletion happens. We may be invoking this command from a completely
different channel, so we can't necessarily look inside the channels
we're targeting for the invocation.
So, we're solving this by just deleting the invocation by using
ctx.message. We do this before we start iterating message history, and
then we only need to iterate the number of messages that was passed into
the command.
A much cleaner approach, which solves the bug reported and identified by
@MarkKoz.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This new context manager makes it easier to make the mod_log ignore
actions like message deletions. The only existing method is the
`ignore()` method, which requires that you pass all the messages you
want to ignore into it.
This one just ignores everything inside its scope.
This isn't the DRYest approach, but it's low-cost and improves the
readability of clean.py quite a bit. Ideally we should go through and
give modlog a proper cleanup, because it's kinda ugly right now.
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Thanks @MarkKoz!
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Co-authored-by: Mark <[email protected]>
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We can now pass in as many channel mentions as we want after any !purge
command - for example `!purge all 5 #python-general #python-language`
|
| | | |\ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Link #how-to-get-help in !free tag
|
| | |\ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Remove the periodic ping from #verification
|
| | |\ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
We do not wanna process bot messages.
|
| | |\ \ \ \ \ \ \ \ \
| | | |_|_|/ / / / /
| | |/| | | | | | | |
|
| | | |_|_|/ / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | | |
It's no longer needed, and causes problems with anti-raid and anti-spam.
|
| | |_|/ / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This creates a clickable link in the response embed. Referencing the
category is no longer necessary.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Ban and kick reason length fix
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| |_|_|_|_|/ / / /
|/| | | | | | | | |
Add tests for the antimalware cog
|
| | |\ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
|
| |\ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / /
|/| | | | | | | | |
Specify encoding when reading tag files
|
| |/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Not all operating systems use UTF-8 as the default encoding. For systems
that don't, reading tag files with Unicode would cause an unhandled
exception.
(cherry picked from commit adc75ff9bbcf8b905bd78c78f253522ae5e42fc3)
|
| |\ \ \ \ \ \ \ \
| |_|_|/ / / / /
|/| | | | | | | |
Ignore response when posting python news
|
| | |\ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
|
| |\ \ \ \ \ \ \ \
| |_|_|_|_|/ / /
|/| | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Discord has introduced a new, strict rate limit for individual channel
edits that reduces the number of allow channel name/channel topic
changes to 2 per 10 minutes per channel.
Unfortunately, our help channel system frequently goes over that rate
limit as it edits the name and topic of a channel on all three "move"
actions we have: to available, to occupied, and to dormant. In addition,
our "unanswered" feature adds another channel name change on top of
the move-related edits.
That's why I've removed the topic/emoji changing features from the help
channel system. This means we now have a generic topic that fits all
three categories and no status emojis in the channel names.
|
| |/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The `check_for_answer` method of the HelpChannels cog relies on the
channel->claimant cache being available. However, as this cache is
(currently) lost during bot restarts, this method may fail with a
KeyError exception.
I've used `dict.get` with an `if not claimant: return` to circumvent
this issue.
|
| |/ / / / / /
| | | | | |
| | | | | | |
Sometimes a mailing list user doesn't press respond correctly to the email, and so a response is sent as a separate thread. To keep only new threads in the channel, we need to ignore those.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | | |
RedisCache - Data Persistence
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This addresses a review comment by @aeros.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The bot can get into trouble in three distinct ways:
- It has no Bot instance
- It has no namespace
- It has no parent instance.
These happen only if you're using it wrong. To make the test more
precise, and to add a little bit more readability (RuntimeError could be
anything!), we'll introduce some custom exceptions for these three
states.
This addresses a review comment by @aeros.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Refactor error messages in _to_typestring and _from_typestring to just
print the prefix tuples instead of that custom error string.
- Create a RedisKeyOrValue type to simplify some annotations.
- Simplify partialmethod calls.
- Make the signatures for _to_typestring and _from_typestring one-liners
- Fix a typo in the errors.
|