|  | Commit message (Collapse) | Author | Age | Lines | 
|---|
| ... |  | 
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| |/ / / / / / / / / / / / / / / /  
|/| | | | | | | | | | | | | | | | |  | 
| | |_|_|/ / / / / / / / / / / / /  
|/| | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Fixes #1094 | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | 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. | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Added the filter rule to the bot/rules folder. | 
| | |_|/ / / / / / / / / / / / /  
|/| | | | | | | | | | | | | | |  | 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Support specifying top-level aliases in the command decorator | 
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| |/ / / / / / / / / / / / / / /  
|/| | | | | | | | | | | | | | | |  | 
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | | Bold link to asking guide in help channel embeds | 
| |/ / / / / / / / / / / / / / / / |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Just like normal aliases, they should only be tuples or lists. This is
likely done by discord.py to prevent accidentally passing a string when
only a single alias is desired. | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | The fruits of my labour. | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Even if the `command` decorators are patched, there are still some other
internal things that need to be patched. For example, the default help
command subclasses the original `Command` type. It's more maintainable
to exclude root alias support for these objects than to try to patch
everything. | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | To avoid explicitly specifying `cls` everywhere, patch the decorators
to set the default value of `cls` to the `Command` subclass which
supports root aliases. | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Override `Bot.add_command` and `Bot.remove_command` to add/remove root
aliases for a command (and recursively for any subcommands). This has
to happen in `Bot` because there's no reliable way to get the `Bot`
instance otherwise. Therefore, overriding the methods in `GroupMixin`
unfortunately doesn't work. Otherwise, it'd be possible to avoid
recursion by processing each subcommand as it got added. | 
| | | |/ / / / / / / / / / / / /  
| |/| | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | |   
| | | | | | | | | | | | | | | | A subclass is used because cogs make copies of Command objects. They do
this to allow multiple instances of a cog to be used. If the Command
class doesn't inherently support the `root_aliases` kwarg, it won't end
up being copied when a command gets copied.
`Command.__original_kwargs__` could be updated to include the new kwarg.
However, updating it and adding the attribute to the command wouldn't be
as elegant as passing a `Command` subclass as a `cls` attribute to the
`commands.command` decorator. This is because the former requires
copying the entire code of the decorator to add the two lines into the
nested function (it's a decorator with args, hence the nested function). | 
| | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | It's unnecessarily precise to do an fetch user API call in order to
distinguish between a user and a reason. Furthermore, a User object
isn't actually required for infraction searches - only an ID is. | 
| | | | | | | | | | | | | | |\ \ |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | The point of format_user is to have a consistent format across the code
base. That should apply to tests too. | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | |\ \ \  
| | | | |_|_|_|_|_|_|_|_|_|/ / /  
| | | |/| | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | Using our expanded API is more efficient than making a request to the
Discord API for potentially every user in the search results. The data
may not be up to date, but that's an acceptable compromise. | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | A lot of redundant code existed between the message and eval filters. | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | The API was change a long time ago to not allow such a situation. | 
| | | | | | | | | | | | | | | | | |  | 
| | | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | 
| | | | | | | | | | | | | | | | | `format_user` isn't used in the apply mod log cause it already shows
both the old and new nicknames elsewhere. |