aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | * | | | | | | | | | | | | | Everyone ping: Changed message, cleaned fileGravatar MrAwesomeRocks2020-08-30-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the message to say the raw member count, not just thousands. Also cleaned up some unused variables and imports in the file.
| | | * | | | | | | | | | | | | | Everyone Ping: Fixed linting errorGravatar MrAwesomeRocks2020-08-29-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switched from string.format to f-string for server member count.
| | | * | | | | | | | | | | | | | Everyone Ping: Changed embed text and locationGravatar MrAwesomeRocks2020-08-29-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | | | | | | | | | | | | Everyone Ping: Removed debug `print`, spellingGravatar MrAwesomeRocks2020-08-29-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed a debug `print` statement, fixed a spelling mistake. Also added a comment for the DM string.
| | | * | | | | | | | | | | | | | Everyone ping: Send embed on ping, fixed checkGravatar MrAwesomeRocks2020-08-29-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 `>`).
| | | * | | | | | | | | | | | | | Everyone Ping: Fixed rule, edited configGravatar MrAwesomeRocks2020-08-29-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the method of checking for an everyone ping. Also changed the config to act as `min pings` instead of `ping enabled/disabled`.
| | | * | | | | | | | | | | | | | Everyone Ping: Added required values to configGravatar MrAwesomeRocks2020-08-29-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | | | | | | | | | | | | Everyone Ping: Added rule to recognized rulesGravatar MrAwesomeRocks2020-08-29-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added mapping to anti-spam cog, then also edited __init__ in the rules folder to expose the apply function.
| | | * | | | | | | | | | | | | | Everyone Ping: Added ruleGravatar MrAwesomeRocks2020-08-29-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the filter rule to the bot/rules folder.
| | | * | | | | | | | | | | | | | Everyone Ping: Add rules to default config fileGravatar MrAwesomeRocks2020-08-29-0/+3
| |_|/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | Merge pull request #1124 from python-discord/feat/backend/707/alias-decoratorGravatar Shirayuki Nekomata2020-08-26-82/+88
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support specifying top-level aliases in the command decorator
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into feat/backend/707/alias-decoratorGravatar Shirayuki Nekomata2020-08-26-70/+156
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge pull request #1128 from python-discord/bold_linkGravatar Shirayuki Nekomata2020-08-26-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bold link to asking guide in help channel embeds
| * | | | | | | | | | | | | | | | | Bold link to asking guide in embedsGravatar Boris Muratov2020-08-26-2/+2
|/ / / / / / / / / / / / / / / / /
| * | | | | | | | | | | | | | | | Type check root aliasesGravatar MarkKoz2020-08-24-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | | | | | | | | Help: include root aliases in outputGravatar MarkKoz2020-08-22-1/+3
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Include root aliases in the command name conflict testGravatar MarkKoz2020-08-22-0/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Replace alias command definitions with root_aliasesGravatar MarkKoz2020-08-22-81/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fruits of my labour.
| * | | | | | | | | | | | | | | | Bot: fix AttributeError for commands which lack root_aliasesGravatar MarkKoz2020-08-22-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | | | | | | | | Patch d.py decorators to support root aliasesGravatar MarkKoz2020-08-22-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid explicitly specifying `cls` everywhere, patch the decorators to set the default value of `cls` to the `Command` subclass which supports root aliases.
| * | | | | | | | | | | | | | | | Bot: add root alias supportGravatar MarkKoz2020-08-22-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | | | | | | | | | Define a Command subclass with root alias supportGravatar MarkKoz2020-08-22-0/+15
| | |/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| | | | | | | | | | | | | * | | Create a UserMention converterGravatar MarkKoz2020-08-11-4/+20
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | Replace InfractionSearchQuery with a generic Snowflake converterGravatar MarkKoz2020-08-11-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | | | | | | | | | | | * | | Resolve conflicts in filtering.pyGravatar MarkKoz2020-08-10-562/+894
| | | | | | | | | | | | | |\ \ \
| | | | | | | | | | | | | * | | | Zero-fill discriminators in infraction searchesGravatar MarkKoz2020-08-10-1/+1
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Use format_user in token remover testGravatar MarkKoz2020-08-10-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The point of format_user is to have a consistent format across the code base. That should apply to tests too.
| | | | | | | | | | | | | * | | | Concatenate string in one lineGravatar MarkKoz2020-08-10-2/+1
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Fix conflict with disabling filter ping for DMsGravatar MarkKoz2020-08-02-68/+307
| | | | | | | | | | | | | |\ \ \ \ | | | | |_|_|_|_|_|_|_|_|_|/ / / / | | | |/| | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Fix test for token remover log messageGravatar MarkKoz2020-07-21-2/+1
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Use user mentions in infraction search resultsGravatar MarkKoz2020-07-21-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | | | | | | | | | | | * | | | ModLog: use user mentionsGravatar MarkKoz2020-07-21-22/+12
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Filtering: use user mentions in mod logsGravatar MarkKoz2020-07-21-6/+5
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Filtering: refactor _add_stats to return a NamedTupleGravatar MarkKoz2020-07-21-25/+27
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Filtering: refactor sending of mod logGravatar MarkKoz2020-07-21-59/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of redundant code existed between the message and eval filters.
| | | | | | | | | | | | | * | | | Use user mentions in mod logsGravatar MarkKoz2020-07-21-10/+14
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Moderation: use user mentions in mod logsGravatar MarkKoz2020-07-21-18/+14
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Moderation: remove multiple active infractions checkGravatar MarkKoz2020-07-21-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API was change a long time ago to not allow such a situation.
| | | | | | | | | | | | | * | | | Superstarify: escape Markdown in nicknamesGravatar MarkKoz2020-07-21-1/+4
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | Superstarify: use user mentions in mod logsGravatar MarkKoz2020-07-21-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `format_user` isn't used in the apply mod log cause it already shows both the old and new nicknames elsewhere.
| | | | | | | | | | | | | * | | | Add util function to format user namesGravatar MarkKoz2020-07-21-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used a lot when sending mod logs and will help with reducing redundancy and maintaining consistency.
| | | | | | | | | | | | | * | | | Clean up importsGravatar MarkKoz2020-07-21-14/+13
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | * | Constants: remove staff_channelsGravatar MarkKoz2020-09-02-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer being used anywhere.
| | | | | | | | | | | | | | | * | Fix user command testsGravatar MarkKoz2020-08-26-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mocking the bot commands channel constant no longer worked after switching to `in_whitelist_check`.
| | | | | | | | | | | | | | | * | Fix infraction counts being shown in wrong channelsGravatar MarkKoz2020-08-26-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They should only be shown in mod channels, not all staff channels. Fix #1127
| | | | | | | | | | | | | | | * | Info: show verbose infractions if user cmd invoked in modmailGravatar MarkKoz2020-08-25-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #1125
| | | | | | | | | | | | | | | * | Info: simplify channel redirection for the user commandGravatar MarkKoz2020-08-25-9/+5
| |_|_|_|_|_|_|_|_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `in_whitelist_check` is a convenient utility that does the same thing as the previous code.
* | | | | | | | | | | | | | | | Merge pull request #1105 from python-discord/joseph/enhanced-user-commandGravatar kwzrd2020-08-23-68/+154
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | Enhanced user command
| * | | | | | | | | | | | | | | Merge branch 'master' into joseph/enhanced-user-commandGravatar kwzrd2020-08-23-56/+96
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | Disable raw commandsGravatar Joe Banks2020-08-20-2/+2
| | | | | | | | | | | | | | | |