| Commit message (Collapse) | Author | Lines |
|
With our own implementation of sphinx's inventory fetching we no longer
need the sphinx package, and requests which were used inside of it.
|
|
|
|
|
|
The sphinx version of the function does a lot of checks that are
unnecessary for the bot because it's not working with anything else
related to docs. The custom implementation means we can throw some of
the code out and get rid of sphinx as a dependency.
|
|
|
|
|
|
The signature length needed more logic and shorter limits
to ensure messages would fit in a discord message in a nice way.
|
|
|
|
|
|
The code copied over from MarkdownConverter's implementation used
c style string formatting, there is no reason to keep the style
of strings in our code
|
|
The previous truncating implementation used a naive method that
disregarded the actual markdown formatting, possibly resulting in
it getting cut out. With the introduction of proper href tags this
became impossible to manage without writing an actual parser; so the
process was moved to happen when the gathered bs4 elements are being
converted into markdown
|
|
|
|
|
|
|
|
Storing BeautifulSoup objects could lead to memory problems because
of their large footprint, the new class replaces the long term storage
by parsing all items on the first fetch of the page and only storing
their markdown string.
|
|
|
|
|
|
|
|
The fragment is only needed for the user and required sparingly
returning only the url while keeping the fragment behind symbol_id
simplifies the uses of the url without it.
|
|
|
|
After moving constants to config, the docstring references were not
updated accordingly, and remained uppercase.
This commit also removed the redundant list indentation.
|
|
|
|
As there are a few bugs in the implementation, I've temporarily disabled
the at-everyone ping filter in the AntiSpam cog. We can disable it after
we've fixed the bugs.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
|
|
On some devices the markdown gets rendered improperly,
leaving the asterisks in the message without bolding.
|
|
Our AntiSpam cog suffers from a race condition that causes it to try and
infract the same user multiple times. As that happens frequently with
the burst_shared filter, it means that our bot joins in and starts
spamming the channel with error messages.
Another issue is that burst_shared may cause our bot to send a lot of
DMs to a lot of different members. This caused our bot to get a DM ban
from Discord after a recent `everyone` ping incident.
I've decided to disable the `burst_shared` filter by commenting out the
relevant lines but leave the code in place otherwise. This means we
still have the implementation handy in case we want to re-enable it on
short notice.
Signed-off-by: Sebastiaan Zeeff <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changed the regex to not punish users who have text other than
`@everyone` in their codeblocks.
Multiline codeblocks can now have `@everyone` in them.
|
|
Removed redundant comments.
Switched to regex to avoid punishing users for putting `@everyone`
in codeblocks.
Changed log message since this isn't a anti-spam rule based off
of frequency.
Added check for `<@&{guild_id}>` ping, also checks for codeblocks.
|
|
|
|
The NEGATIVE_REPLIES header is now the title of the embed.
|
|
Changed cryptic variable name.
Changed ping response to use `bot.constants.NEGATIVE_REPLIES`.
Changed ping repsonse to only ping user once.
|
|
Seperated the member count by commas every three digits.
|
|
Changed the message to say the raw member count, not just thousands.
Also cleaned up some unused variables and imports in the file.
|
|
Switched from string.format to f-string for server member count.
|
|
The you can view the embed text in the `everyone_ping.py` file.
The embed also now sends in the server instead of a DM.
|
|
Removed a debug `print` statement, fixed a spelling mistake.
Also added a comment for the DM string.
|
|
When a user pings the everyone role, they now get an embed explaining
why what they did was wrong.
The ping detection was also fixed to not thing that every message was a
ping (changed form `>=` to `>`).
|
|
Changed the method of checking for an everyone ping.
Also changed the config to act as `min pings` instead
of `ping enabled/disabled`.
|
|
The `max` and `interval` values were required, so they were added to
the config file and the rule was modified to accept these new values.
|
|
Added mapping to anti-spam cog, then also edited __init__ in the rules
folder to expose the apply function.
|