Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development for v3.1.0 #333

Merged
merged 57 commits into from
Aug 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
288d529
Initial commit
Taaku18 Jun 30, 2019
aa29158
Major commit
Taaku18 Jul 1, 2019
748831f
Merge from master
Taaku18 Jul 1, 2019
6c756a1
Fixed a db problem and new config var
Taaku18 Jul 2, 2019
863fdeb
Some fixes
Taaku18 Jul 2, 2019
f3afd99
Some fixes + changelog
Taaku18 Jul 3, 2019
2bb545f
Update - see changelog
Taaku18 Jul 6, 2019
ef678c0
Fixed some logging problems
Taaku18 Jul 6, 2019
f40de02
Added config check
Taaku18 Jul 6, 2019
f387f34
Some changes see cl
Taaku18 Jul 9, 2019
12c4147
Use black format
Taaku18 Jul 11, 2019
24f9a15
Formatting
Taaku18 Jul 12, 2019
e68b997
Lint + black
Taaku18 Jul 12, 2019
3c917b4
Updated pipfile
Taaku18 Jul 12, 2019
1dce475
A minimal version of req.txt
Taaku18 Jul 12, 2019
f9781c3
Remove requirement for colorama
Taaku18 Jul 13, 2019
a2787e8
thread_auto_close_silently + some fixes
Taaku18 Jul 13, 2019
8969a79
Black formatting
Taaku18 Jul 13, 2019
41f7207
Bump: v3.1.0
Taaku18 Jul 13, 2019
40fee5c
Updated changelog
Taaku18 Jul 13, 2019
e585b23
Update README.md
Taaku18 Jul 13, 2019
9556ef7
Merge from master
Taaku18 Jul 13, 2019
db2762d
Merge branch 'master' into rewrite-config
Taaku18 Jul 18, 2019
226b3dc
Bump discord.py version to 1.2.3
Taaku18 Jul 18, 2019
cbdf61f
Use tasks
Taaku18 Jul 19, 2019
0bc17a8
Misc
Taaku18 Jul 21, 2019
8f7d020
Black/lint
Taaku18 Jul 21, 2019
8877a1b
Merge from master
Taaku18 Jul 22, 2019
b3e8f62
Snippets/aliases
Taaku18 Jul 27, 2019
1564e1f
Multistep alias
Taaku18 Jul 27, 2019
60b5eb1
Address semvar stuff
Taaku18 Jul 27, 2019
d220937
misc help and return user_typing
Taaku18 Jul 28, 2019
1f8d2d0
Snippet/alias help msg
Taaku18 Jul 28, 2019
310f652
Config help
Taaku18 Jul 28, 2019
afa3c9a
I'm dumb
Taaku18 Jul 28, 2019
3afa23e
More fluent English
Taaku18 Jul 28, 2019
894ad2f
Numbers carries over in snippet/alias now
Taaku18 Jul 28, 2019
7f6992f
Displays image/thumbnail for config help
Taaku18 Jul 28, 2019
bdb2bcf
Paginate config options and patched a thread open bug
Taaku18 Jul 29, 2019
c7dd2fe
Another bug...
Taaku18 Jul 29, 2019
0ce91d0
Fix Expired Invite (#334)
StephenDaDev Jul 29, 2019
fb257d4
Add dockerfile
kyb3r Jul 29, 2019
31c1164
perms stuff
Taaku18 Jul 29, 2019
af90421
Fix stuff with viewing perm
Taaku18 Jul 29, 2019
c596f1c
1-5 as level names
Taaku18 Jul 29, 2019
3a07329
Add doc for snippet raw
Taaku18 Jul 31, 2019
92fad07
Fix log url prefix
Taaku18 Jul 31, 2019
5a26c28
Config help on protected keys
Taaku18 Jul 31, 2019
30a6c7f
Added raw alias
Taaku18 Jul 31, 2019
c89ce14
Emoji wasn't showing cuz im dumb
Taaku18 Aug 1, 2019
bef1437
Paginator change
Taaku18 Aug 3, 2019
fc098d4
Merge from master
Taaku18 Aug 3, 2019
722db7b
merge + bump requirements.min.txt
Taaku18 Aug 5, 2019
56cef8d
Formatting and changelog change
Taaku18 Aug 6, 2019
3fee32b
Merge from master
Taaku18 Aug 6, 2019
2c04622
Updated README.md
Taaku18 Aug 7, 2019
6a7a604
Fix a blocked bug
Taaku18 Aug 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ dmypy.json
# VS Code
.vscode/

# Node
package-lock.json
node_modules/

# Modmail
config.json
plugins/
Expand Down
7 changes: 4 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ignore-patterns=

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=1
jobs=0

# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
Expand Down Expand Up @@ -82,7 +82,8 @@ disable=raw-checker-failed,
too-many-lines,
line-too-long,
bad-continuation,
invalid-name
invalid-name,
logging-too-many-args


# Enable the message, report, category or checker with the given id(s). You can
Expand Down Expand Up @@ -507,4 +508,4 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception".
overgeneral-exceptions=Exception
overgeneral-exceptions=BaseException
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ matrix:
dist: xenial

install:
- pipenv install
- pipenv install pylint
- pipenv install -d

script: python .lint.py
script:
- pipenv run python .lint.py
73 changes: 67 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,75 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
This project mostly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html);
however, insignificant breaking changes does not guarantee a major version bump, see the reasoning [here](https://github.com/kyb3r/modmail/issues/319).

# [UNRELEASED]

### Changed
# v3.1.0

### Breaking

- `disable_recipient_thread_close` is removed, a new configuration variable `recipient_thread_close` replaces it which defaults to False.
- Truthy and falsy values for binary configuration variables are now interpreted respectfully.
- `LOG_URL_PREFIX` cannot be set to "NONE" to specify no additional path in the future, "/" is the new method.

### Added

- `?sfw`, mark a thread as "safe for work", undos `?nsfw`.
- New config variable, `thread_auto_close_silently`, when set to a truthy value, no message will be sent when thread is auto-closed.
- New configuration variable `thread_self_closable_creation_footer` — the footer when `recipient_thread_close` is enabled.
- Added a minimalistic version of requirements.txt (named requirements.min.txt) that contains only the absolute minimum of Modmail.
- For users having trouble with pipenv or any other reason.
- Multi-step alias, see `?help alias add`. Public beta testing, might be unstable.
- Misc commands without cogs are now displayed in `?help`.
- `?help` works for alias and snippets.
- `?config help <config-name>` shows a help embed for the configuration.
- Support setting permissions for sub commands.
- Support numbers (1-5) as substitutes for Permission Level REGULAR - OWNER in `?perms` sub commands.

### Changes

- `thread_auto_close_response` has a configurable variable `{timeout}`.
- `?snippet` is now the default command name instead of `?snippets` (`?snippets` is still usable). This is to make this consistent with `?alias`/`?aliases`.
- `colorama` is no longer a necessity, this is due to some unsupported OS.
- Changelog command can now take a version argument to jump straight to specified version.
- `?plugin enabled` results are now sorted alphabetically.
- `?plugin registry` results are now sorted alphabetically, helps user find plugins more easily.
- `?plugin registry page-number` plugin registry can specify a page number for quick access.
- A reworked interface for `?snippet` and `?alias`.
- Add an `?snippet raw <name>` command for viewing the raw content of a snippet (escaped markdown).
- Add an `?alias raw <name>` command for viewing the raw content of a alias (escaped markdown).
- The placeholder channel for the streaming status changed to https://www.twitch.tv/discordmodmail/.
- Removed unclear `rm` alias for some `remove` commands.
- Paginate `?config options`.
- All users configured with a permission level greater than REGULAR has access to the main Modmail category.
- Category overrides also changes when a level is removed or added to a user or role.
- `@everyone` is now accepted for `?perms add`.

### Fixes

- `?notify` no longer carries over to the next thread.
- `discord.NotFound` errors for `on_raw_reaction_add`.
- `mod_typing` ~~and `user_typing`~~ (`user_typing` is now by-design to show) will no longer show when user is blocked.
- Better `?block` usage message.
- Resolves errors when message was sent by mods after thread is closed somehow.
- Recipient join/leave server messages are limited to only the guild set by `GUILD_ID`.
- When creating snippets and aliases, it now checks if another snippets/aliases with the same name exists.
- Was looking for `config.json` in the wrong directory.

### Internal

- Removed supporting code for GitHub interaction.
- All default config values moved to `core/config.py`.
- `config.cache` is no longer accessible, use `config['key']` for getting, `config['key'] = value` for setting, `config.remove('key')` for removing.
- Dynamic attribute for configs are removed, must use `config['key']` or `config.get('key')`.
- Removed helper functions `info()` and `error()` for formatting logging, it's formatted automatically now.
- Bumped discord.py version to 1.2.3.
- Use discord tasks for metadata loop.
- More debug based logging.
- Reduce redundancies in `?perms` sub commands.
- paginator been split into `EmbedPaginatorSession` and `MessagePaginatorSession`, both subclassing `PaginatorSession`.

# v3.0.3

Expand Down Expand Up @@ -171,7 +232,7 @@ Un-deprecated the `OWNERS` config variable to support discord developer team acc
### New Permissions System

- A brand new permission system! Replacing the old guild-based permissions (ie. manage channels, manage messages), the new system enables you to customize your desired permission level specific to a command or a group of commands for a role or user.
- There are five permission groups/levels:
- There are five permission levels:
- Owner [5]
- Administrator [4]
- Moderator [3]
Expand All @@ -193,7 +254,7 @@ The same applies to individual commands permissions:

To revoke permission, use `remove` instead of `add`.

To view all roles and users with permission for a permission group or command do:
To view all roles and users with permission for a permission level or command do:
- `?permissions get command command-name`
- `?permissions get level owner`

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ RUN mkdir -p /bot && cd /bot && git clone https://github.com/kyb3r/modmail .
WORKDIR /bot
RUN pipenv install

CMD ["pipenv", "run", "python3", "bot.py"]
CMD ["pipenv", "run", "bot"]
7 changes: 5 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ verify_ssl = true

[dev-packages]
black = "==19.3b0"
pylint = "*"

[packages]
colorama = ">=0.4.0"
Expand All @@ -17,10 +18,12 @@ isodate = ">=0.6.0"
dnspython = "~=1.16.0"
parsedatetime = "==2.4"
aiohttp = "<3.6.0,>=3.3.0"
pylint = "*"
python-dotenv = ">=0.10.3"
pipenv = "==2018.11.26"
"discord.py" = "==1.1.1"
"discord.py" = "==1.2.3"

[requires]
python_version = "3.7"

[scripts]
bot = "python bot.py"
Loading