* Initial commit
* Add some args
* bool prolog
* index
* Add more arguments
* more arguments, style fixes
* improve naming of arguments
* Fix up backlog
* Run black
* extra corrections from backlog
* Update tempban arg names
* backlog
* change prolog type
* Change kick argument prolog to member instead of user
* Update argument names
* missed a colon
* Update prolog to be friendly with non-positional args
* Edit through the decorator instead
* Add back docstring spacing
* black
* usage in decorator for name commands
* Fix command signature
* fixup docstring spacing
* style fixes
* Add spacing inside unban docstring
* Rename args instead of using usage
* black - simple
* Add labeler glob
* unify style
* rename variables instead of usage
* Update docstrings correspondingly
* run black
* update description in usage
* ehh this isn't necessary...
* fix up tags
* fix grammar and accuracy issues
* fix docstring too
* [Mod] No longer loop through all guilds on check_tempban_expirations.
* Address Jack's review.
* I don't think this comment actually served any purpose
* Split this into more methods
* Small optimization for cases where the guild tempbans weren't updated
* Blackify
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* 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
* [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>
* Make command usage in help for required arguments consistent
* Bob 3
* Bob 1
* Docstring updates
* Address Flame's review
* Update cog guides in docs
* 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>
* 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>
* 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>
* 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>
* create cog disbale base
* Because defaults...
* lol
* announcer needs to respect this
* defaultdict mishap
* Allow None as guild
- Mostly for interop with with ctx.guild
* a whitespace issue
* Apparently, I broke this too
* Apply suggestions from code review
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* This can probably be more optimized later, but since this is a cached value, it's not a large issue
* Report tunnel closing
* mod too
* whitespace issue
* Fix Artifact of prior method naming
* these 3 places should have the check if i understood it correctly
* Announce the closed tunnels
* tunnel oversight
* Make the player stop at next track
* added where draper said to put it
* Apply suggestions from code review
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Remove users from tempban unban list when hackbanning them
* black and missing bracket
* make sure this actually gets processed
* let the user know when a tempban was upgraded
* say more things
* reduce config calls
* jack loves performance
* adress review
* review the 2nd
* add duration atribute
* sanity checks
* add days parameter
* maybe resolve conflicts?
* black and make linting happy
* right... I need to send this
* but I still need to return... oops
* lets reduce config calls here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Lets normalize how we name config attributes across the bot.
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* ....
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* stop using `bot.guilds` in `on_command_add`
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* missed this one
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* nothing to see here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* lets reduce config calls here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* stop using `bot.guilds` in `on_command_add`
* missed this one
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Update redbot/cogs/mod/kickban.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/cogs/filter/filter.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* make all large loops async to avoid blocking larger bots
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* ...
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* okay now working AsyncGen
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* may or may not have forgotten black
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack's review
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* DOCS
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* DOCS
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/core/utils/__init__.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/core/utils/__init__.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* avoid loop if possible and if not only iterate once
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* Lets normalize how we name config attributes across the bot.
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* ....
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* nothing to see here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* I know this needs a changelog entry and docs still
* update tests for new behavior
* update docs, filter; add changelog
* Ready for review
* stop fetching the same Audit logs when the bot is the mod
* I forgot to press save
* fix a comprehension
* Fix AttributeError
* And the other place that happens
* timing fixes
* same stuff, but with some more spurious error supression
* fix issue in permissions found in this
* fix a few more spurious errors
* fix another issue
* semi-spurious error fixes
* .
* formatting
* move this to properly log
* distutils import + virtualenv
* more fixes
* Dependency update
discord.py==1.0.1
websockets<7
[style]
black==19.3b0
[Docs]
jinja==2.10.1
urllib3==1.24.2
Changes related to breaking changes from discord.py have also been made
to match
As of this commit, help formatter is back to discord.py's default
* [V3 Mod] Use a composite class for mod
This turns mod.py into acomposite class
I've split things in this up based on purpose, including `movetocore`
`movetocore` is a set of things which likely belong in the core bot and
not relying on mod being loaded.
This is part of #2500
Per discussion in discord, this should be the first thing in #2500
merged
* Move this back,
mod was importable,
and this was intended as non-breaking
* Prevent fix from being lost if merged before this.
see Cog-Creators/Red-DiscordBot#2510
* Move case creation to before sending
see #2515
* fix failed merge done in web