13 Commits

Author SHA1 Message Date
Sebass13
b5c71bc59c [V3 Mod/Filter] Fix #1202 (#1327)
* Fix #1326

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.

* Fix #1202

Raises `TypeError` when `User` objects are passed into `is_mod_or_superior` or `is_admin_or_superior`, as only `Member` objects have a `guild` attribute.

* Fixes #1202

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.
2018-02-21 18:36:13 -05:00
palmtree5
73d68e926d [V3 Mod] fix error with [p]names (#1188)
* [V3 Mod] fix error with [p]names

* [V3 Mod] add null cleaner to names command
2017-12-17 20:23:35 -05:00
palmtree5
4f0043b805 [V3 Mod] fix some issues relating to ignore (#1166)
* [V3 Mod] remove unnecessary decos from ignore/unignore

* [V3 Core] fix is_mod and is_admin so they don't return True if the mod/admin roles aren't set
2017-12-12 20:31:12 -05:00
Tobotimus
9dbf56f942 [Config] Retrieve/save values with async context manager (#1131)
* [Config] Retrieve/save values with async context manager

* Add a little docstring

* Documentation

* Implement async with syntax in existing modules
2017-12-03 18:07:34 -09:00
palmtree5
183572f312
[V3 Mod&Filter] add tempbans and filtering names/nicknames (#1123)
* [V3 Mod] add tempban command

* [V3 Filter] add name filtering

* [V3 Mod] Modify invite finding to have a max_age param

* [V3 Mod and Filter] regen messages.pot

* [V3 Mod] fill in formatting on tban invite

* [V3 Filter] add on_member_join + refactor logic on_member_update
2017-12-03 17:27:48 -09:00
palmtree5
69c50591b2 [V3 Mod] Fix unban and case numbering problems (#1101)
* [ModLog] fix case numbering issue

* [Mod] fix unban command
2017-11-19 18:47:30 -05:00
Tobotimus
7322f0c676 [V3 Mod/ModLog] Fix duplicate cases and allow case creation without audit log perms (#1102)
* Use ban/unban queue

* Refactor unban's cmd help

* Better support for no audit log perms
2017-11-19 13:23:47 -09:00
Twentysix
b141729830
[V3 Mod] Fix DMs not being handled on_command (#1086) 2017-11-17 20:43:49 +01:00
Tobotimus
fb0be051aa [V3 Modlog] Modlog layout and formatting changes (#1089)
* Modlog layout and formatting changes

* Remove unused import
2017-11-14 13:59:34 -09:00
palmtree5
d6fce3c145
[Mod] fix duplicate cases on ban/unban (fixes Cog-Creators/Red-DiscordBot/issues/1052) (#1064) 2017-11-05 16:02:45 -09:00
palmtree5
32372ea237 [V3] Standardize to ctx.send_help() (#1077) 2017-11-05 13:09:02 -05:00
palmtree5
8d8e1c61d8 [V3 Mod] Fix exception registering unchanged case types (#1059)
* [V3 Mod] handle RuntimeError from registering unchanged case types

* [Mod] drop unnecessary except
2017-10-27 20:43:42 -04:00
palmtree5
fb125ef619 [V3] Mod initial rewrite (#1034)
* Readd work due to redoing branch

* [modlog] Move to core and start work on separating it from cogs

* More work on modlog separation

* [Core] Finish logic for modlog, do docstrings, async getters

* [Core] Add stuff to dunder all

* [Docs] Add mod log docs

* [Core] Move away from dunder str for Case class

* [Docs] don't need to doc special members in modlog docs

* More on mod log to implement commands

* More work on Mod

* [Mod] compatibility with async getters

* [Tests] start tests for mod

* [Tests] attempted fix

* [Tests] mod tests passing now!

* [ModLog] update for i18n

* modlog.pot -> messages.pot

* [Mod] i18n

* fix getting admin/mod roles

* Fix doc building

* [Mod/Modlog] redo imports

* [Tests] fix imports in mod tests

* [Mod] fix logger problem

* [Mod] cleanup errors

* A couple of bug fixes

Async getters, some old `config.set` syntax

* Filter ignores private channels

* Fix softban

Was still relying on default channels

* Actually ignore private channels

* Add check for ignored channels

* Fix logic for ignore check

* Send confirm messages before making case

* Pass in guild when setting modlog

* Thanks autocomplete

* Maintain all data for case

* Properly ignore softbans in events

* [Mod] bugfixes

* [Mod] more changes

* [ModLog] timestamp change

* [Mod] split filter and cleanup to their own cogs + regen messages.pot

* [Cleanup] change logic

* [Cleanup] increase limit for channel.history

* [Mod] await getter in modset banmentionspam

* [Mod] attempt duplicate modlog message fix

* [Mod] get_user -> get_user_info

* [Modlog] change reason command so the case author can edit their cases (#806)

* [Modlog] make reason command guild only

* [Modlog] clarify the reason command's help

* [Mod] package path changes + numpy style docstrings for modlog

* [Mod] change ban and unban events to need view audit log perms to find/create a case

* [Modlog] refactoring

* [Filter] add autoban feature

* [Mod] update case types + event changes

* [Mod/Modlog] fix tests, fix permissions things

* [Docs] fix up modlog docs

* Regenerate messages.pot
2017-10-22 21:02:16 -04:00