210 Commits

Author SHA1 Message Date
github-actions[bot]
e80a00ec1b
[i18n] Automated Crowdin downstream (#4829)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-16 19:22:05 +00:00
Flame442
7b04c04551
[Mod] Add two new settings to disable name/nickname tracking (#4799)
* Add default settings for name tracking

* Add configuration command for name tracking

* Check the track names settings before tracking

* *grumble*

* Fix permissions levels

* Update settings.py

* Use clean_prefix in inline, and don't use f-strings in `_()`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 20:13:37 +01:00
PhenoM4n4n
62411bc2a5
Add a command for deleting usernames and nicknames to Mod cog (#4827)
* mod delete names

* sTyLe fOrMAttInG

* Remove `[p]deletemodkeys` and have `[p]deletenames` remove empty keys

* Rename `[p]deletenames` to `[p]modset deletenames`

* Fix wrong variable being used

* Add confirmation to avoid mistakes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 19:58:00 +01:00
aleclol
acec5c6efe
[Mod] Add default bot color to kick & ban DM (#4822) 2021-02-15 01:34:05 +01:00
github-actions[bot]
663876fba3
Automated Crowdin downstream (#4804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-11 13:20:38 +00:00
github-actions[bot]
0f8f33fed2
Automated Crowdin downstream (#4734)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-04 18:05:40 +00:00
MAX
c11e9afec7
[mod] Improve help of ban/kick commands. (#4715)
* better explain on how to use.

* i.... dont know why i removed that dot.

* don't think that was meant to

* Update kickban.py

* smh

* style????

* hm?

* last try to fix style......

i dont even know how to do this :/

* failing style is fun, trynna learn.

* .....

* not the best way but lets try?

* yep, didnt work dropping softban.

* Update kickban.py

* grammar fix
2021-01-23 21:18:29 -05:00
jack1142
537656c365
Fix role position checks (#4740) 2021-01-20 13:32:43 -07:00
Dav
d7a3da49f0
[Mod] Make tempban not fail if no vanity url is set up (#4714)
* catch if a vanity url is not set up

* black

Co-authored-by: David Bauch <david.bauch@capgemini.com>
2021-01-17 23:42:00 +01:00
github-actions[bot]
b76b6305d1
Automated Crowdin downstream (#4703)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-01-07 17:26:35 +00:00
github-actions[bot]
13cd751932
Automated Crowdin downstream (#4689)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-24 15:45:31 +01:00
Predeactor
d53ff57794
Shorten the audit log reason appropriately, remove unused vars (#4189)
* [Mod] Check for reason length & remove unused vars

This PR also remove unused variable.

* Blame me

* Apply Kowlin order.

Text will get truncate in audit logs in case we're going over 512 characters.

* This is already handled by ban_user()

* Use `get_audit_reason()` in `[p]tempban`

* Add a new kwarg to `get_audit_reason()` instead

* Include `[p]voiceban` and `[p]voiceunban`

* Include Mutes cog

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 03:22:59 +01:00
jack1142
b36a702e62
Make command usage in help for required arguments consistent (#4589)
* Make command usage in help for required arguments consistent

* Bob 3

* Bob 1

* Docstring updates

* Address Flame's review

* Update cog guides in docs
2020-12-22 14:14:47 -05:00
github-actions[bot]
7f587ea46b
Automated Crowdin downstream (#4664)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-18 19:10:17 +01:00
github-actions[bot]
e2adb29cf3
Automated Crowdin downstream (#4638)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-29 22:04:43 +01:00
github-actions[bot]
bc8f2311d9
Automated Crowdin downstream (#4627)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-19 22:18:05 +01:00
github-actions[bot]
e50b32cc27
[i18n] Automated Crowdin downstream (#4596)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-16 18:26:02 +01:00
MAX
1747d901d1
[Mod] Support competing status in [p]userinfo command (#4611)
* Competing in userinfo

* Update names.py

* Update names.py
2020-11-16 17:25:41 +01:00
jack1142
a7ec40664e
Fix reason variable shadowing in [p]massban (#4575) 2020-11-07 03:44:59 +01:00
github-actions[bot]
0089380bfd
Automated Crowdin downstream (#4578)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-05 16:53:43 +01:00
github-actions[bot]
ffcf104dfc
Automated Crowdin downstream (#4567)
Red I18n: "Context comments are changed edition"

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-02 17:32:43 +01:00
jack1142
532ac6cfa9
I mean... Technically we fixed the security issue, right? (#4556) 2020-10-28 02:34:11 +01:00
jack1142
726bfd38ad
Merge pull request from GHSA-mp9m-g7qj-6vqr
* Query members for unchunked guilds in massban

* that thing that is a thing ;)
2020-10-27 20:46:49 +01:00
github-actions[bot]
b018c6a24d
[i18n] Automated Crowdin downstream (#4476)
Kowlin told me I should just merge.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-26 21:26:02 +01:00
Kowlin
2413c6abd3
[Core] Guild scoped I18n (#3896)
* Guild I18n

Never again!

* Finish off guild scoped i18n

* Black formatting

* Added guild only flags.

* Fix missing import.

* Added listing of guild i18n settings

* Added API support

* Added API support... properly!

* Added API support... for realsies!

* Auto-translate create_cases instances

You're welcome cog creators! Jack talked me into this!

* Fix get_regional_format to actually return properly

* Cleanup `set showsettings`

* Style pass

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/events.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Fix missing import

* Improve caching

* Removal of unneeded function

* Fix some naming

* IDFK anymore...

* Reformat

* Update redbot/core/settings_caches.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/settings_caches.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/settings_caches.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Remove line number

* Fix global sets

* Set contextual locale manually where needed

* Reports cog is wonderful...

* Update redbot/core/core_commands.py

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>

* Set contextual locale manually where needed in Mutes cog

* s

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-10-26 17:59:11 +01:00
TrustyJAID
7bb6e60c52
Move mutes to new cog, add role-based and temporary mutes (#3634)
* revert the revert the revert git is hard...

* and remove old mutes

* make voicemutes less yelly

* fix error when no args present in mute commands

* update docstrings

* address review

* black

* oops

* fix voicemutes

* remove mutes.py file

* Remove _voice_perm_check from mod since it's now in mutes cog

* remove naive datetimes
prevent muting the bot
prevent muting yourself
fix error message when lots of channels are present

* change alias for channelunmute
Be more verbose for creating default mute role

* add `[p]activemutes` to show current mutes in the server and time remaining on the mutes

* improve resolution of unmute time

* black

* Show indefinite mutes in activemutes and only show the current servers mutes in activemutes

* replace message.created_at with timezone aware timezone

* remove "server" from activemutes to clean up look since channelmutes will show channel

* better cache management, add tracking for manual muted role removal in the cache and modlog cases

* Fix keyerror in mutes command when unsuccessful mutes

* add typing indicator and improve config settings

* flake8 issue

* add one time message when attempting to mute without a role set, consume rate limits across channels for overwrite mutes

* Don't clear the whole guilds settings when a mute is finished. Optimize server mutes to better handle migration to API method later. Fix typehints.

* Utilize usage to make converter make more sense

* remove decorator permission checks and fix doc strings

* handle role changes better

* More sanely handle channel mutes return and improve failed mutes dialogue. Re-enable task cleaner. Reduce wait time to improve resolution of mute time.

* Handle re-mute on leave properly

* fix unbound error in overwrites mute

* revert the revert the revert git is hard...

* and remove old mutes

* make voicemutes less yelly

* fix error when no args present in mute commands

* update docstrings

* address review

* black

* oops

* fix voicemutes

* Remove _voice_perm_check from mod since it's now in mutes cog

* remove naive datetimes
prevent muting the bot
prevent muting yourself
fix error message when lots of channels are present

* change alias for channelunmute
Be more verbose for creating default mute role

* add `[p]activemutes` to show current mutes in the server and time remaining on the mutes

* improve resolution of unmute time

* black

* Show indefinite mutes in activemutes and only show the current servers mutes in activemutes

* replace message.created_at with timezone aware timezone

* remove "server" from activemutes to clean up look since channelmutes will show channel

* better cache management, add tracking for manual muted role removal in the cache and modlog cases

* Fix keyerror in mutes command when unsuccessful mutes

* add typing indicator and improve config settings

* flake8 issue

* add one time message when attempting to mute without a role set, consume rate limits across channels for overwrite mutes

* Don't clear the whole guilds settings when a mute is finished. Optimize server mutes to better handle migration to API method later. Fix typehints.

* Utilize usage to make converter make more sense

* remove decorator permission checks and fix doc strings

* handle role changes better

* More sanely handle channel mutes return and improve failed mutes dialogue. Re-enable task cleaner. Reduce wait time to improve resolution of mute time.

* Handle re-mute on leave properly

* fix unbound error in overwrites mute

* remove mutes.pt

* remove reliance on mods is_allowed_by_hierarchy since we don't have a setting to control that anyways inside this.

* black

* fix hierarchy check

* wtf

* Cache mute roles for large bots

* fix lint

* fix this error

* Address review 1

* lint

* fix string i18n issue

* remove unused typing.Coroutine import and fix i18n again

* missed this docstring

* Put voiceban and voiceunban back in mod where it's more appropriate

* Address review 2 electric boogaloo

* Make voicemutes use same methods as channel mute

* black

* handle humanize_list doesn't accept generators

* update voicemutes docstrings

* make voiceperm check consistent with rest of error handling

* bleh

* fix modlog case spam when overrides are in place

* <a:pandaexplode:639975629793787922>

* bleck

* use total_seconds() instead of a dict, sorry everyone already using this lmao

* <:excited:474074780887285776> This should be everything

* black

* fix the things

* bleh

* more cleanup

* lmao hang on

* fix voice mutes thingy

* Title Case Permissions

* oh I see

* I'm running out of funny one-liners for commit messages

* oof

* ugh

* let's try this

* voicemutes manage_permissions

* Cleanup mutes if they expire when member is not present

* black

* linters go brr

Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-10-26 02:52:11 +01:00
aikaterna
18986bcc42
[Mod] Fix + more info for modset defaultduration (#4525)
* [Mod] Fix + more info for modset defaultduration

* Update settings.py

* Duration must be greater than zero

* Don't need the extra parens here
2020-10-25 20:43:44 +01:00
Draper
ca078e7cd9
Fix a crash when calling [p]modset showsettings (#4518)
* Fix a crash when calling `[p]modset showsettings`

* Update redbot/cogs/mod/settings.py

* be more explicit
2020-10-22 11:05:40 -07:00
Stonedestroyer
08bd0567ad
Grammar fixes (#4500)
* Grammar fixes

* More changes

* Grammar

* Error grammar

* Spelling

* Grammar

* REsolves grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* "commited" > "committed"

* apostrophe

* more grammar

* grammar

* `funtion` to `function`

* grammar in alias cog

* grammar in cleanup cog

* grammar in customcom cog

* grammar in mod cog

* grammar in reports cog

* fix grammar in streams cog

* missing apostrophe

* grammar fix in trivia cog

Co-authored-by: Jyu Viole Grace <24418520+thisisjvgrace@users.noreply.github.com>
Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
2020-10-18 08:52:56 +01:00
Dav
f5de382946
[Mod] Add default tempban duration setting (#4473)
* Add support for default duration in kickban.py

* add setting command and info to settings view

* add config key

* black

* Thx jack

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* adress review

* Address review

* typo

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-16 00:15:14 +02:00
PhenoM4n4n
dc817aeeac
Allow [p]ban to hackban and rename [p]hackban to [p]massban (#4422)
* ban revamp

* black & converters fix

* discord.object

* Update redbot/cogs/admin/admin.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* remove discord.user converter

* black

* .

* Update redbot/cogs/mod/kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/mod/kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/mod/kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/mod/kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* incomplete

* massban support

* black

* Use 2-tuple to separate result and the message in `ban_user()`

This also fixes the issue with `True` being equal to `1` which caused a problem with previously returned types

* Whoops...

* trailing whitespace...

* I missed this one

* Update kickban.py

* Update kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-15 23:20:20 +02:00
github-actions[bot]
80d99af5b0
Automated Crowdin downstream (#4462)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-03 00:30:26 +02:00
Sharky
3699c246df
[Mod] Account for duplicated mentions (#4359)
* Account for duplicated mentions

* Spelling fix + Wording change

* Requested changes *hopefully*

* forgot to formattttttttttttttttttttttt

* Improve the consistency with existing commands in inconsistent `[p]modset` group

* What was the point of defining `guild` if you didn't end up using it, Jack!?

* I hate you, web editor ಠ益ಠ

* You could have just copy-pasted this Jack, seriously...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-27 21:27:53 -04:00
jack1142
a2ae485286
Deprecate is_allowed_by_hierarchy() core util (#4435) 2020-09-27 21:27:22 -04:00
github-actions[bot]
a6ff5b8e9c
Automated Crowdin downstream (#4445)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 22:01:14 +02:00
github-actions[bot]
a09dddb2cf
Automated Crowdin downstream (#4432)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 02:14:41 +02:00
Dav
d7da0b4081
[Mod] Pluralize properly in userinfo (#4397)
* Pluralize properly in userinfo

* black

* totally didn't forget roles

* Almost seems like you have a point there...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Yes... right... this one too

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Yes, yes we do.

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-21 00:39:44 +02:00
Kowlin
88503bbf24
[Mod] Correctly log and store the previous (nick)name (#4131) 2020-09-20 02:42:12 +02:00
Kowlin
a9656dea38
Delete no-NO in favor of nb-NO (#4396) 2020-09-05 02:48:55 +02:00
github-actions[bot]
f8fcabfe10
Automated Crowdin downstream (#4395)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 17:26:47 +02:00
github-actions[bot]
e1a9b31e9b
Automated Crowdin downstream (#4394)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 15:48:34 +02:00
Vexed
8956f63229
[Mod] Dots and properly capitalise Discord (#4377) 2020-08-31 14:25:43 +01:00
github-actions[bot]
ec7c2ca4b9
Automated Crowdin downstream (#4373)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-30 17:42:37 +02:00
jack1142
85afe19455
Bump black to 20.8b1 (and reformat) (#4371)
* Bump black version

* Reformat with black
2020-08-29 19:12:28 +02:00
github-actions[bot]
8c7848f18b
Automated Crowdin downstream (#4327)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-20 19:30:44 +02:00
github-actions[bot]
d1b7e0eafb
Automated Crowdin downstream (#4181)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-14 08:40:04 +02:00
DevilXD
6e63ed4e60
Use aware objects when storing and reading UTC timestamps (#4017)
* Use aware objects instead of naive ones

* Use aware objects when storing and reading UTC timestamps

* Remove unneeded parentheses

* Fixed naive and aware objects unable to be compared here

* Address feedback

* Fix the newly added `modlog.create_case()` calls

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-12 10:46:32 +02:00
Sharky
73a34eacd6
[Mod] Add kick and warn to mention spam (#4038)
* Mention spam addition

Adjust code to allow for warning and kicking in mention spam automoderation.

Added new subcommand group, mentionspam. Which will display settings of warn, kick, ban, mentionspam when called.

Adjust config to account for this.

* Condense config + removal of comments

Condense config into one variable to make one call.

Removed unneeded comments I left.

* Add warning casetype

Copied over from warnings cog

* Update strings + change function names

* Changed prints and logs. Account for showsettings, removed blocking.

If this style breaks, blame draper...

* Black format...still blaming draper.

* Adding period at end of description

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* config migration

* Fix TypeError, add default information.

* Max_mention wording change

Thanks to @zephyrkul for suggesting the word changes.

* Require argument for max_mention

* Fix warn modlog case creation

* Fix casetype conflict

maaaaaaaaaagicccccccccc timeeeeeeeeeeeeeeeeeeeeeeeee

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-08-11 23:24:22 -04:00
jack1142
9798538438
Remove provisional note from NoParseOptional, fix and start using UserInputOptional (#4142) 2020-08-10 20:20:02 +01:00
Dav
35b0224690
[Mute] Indicate that a guild mute/unmute is currently being processed. (#4172)
Co-authored-by: fixator10
2020-08-10 20:19:44 +01:00