discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

Add Threads/Tickets. #53

Closed onerandomusername closed 2 years ago

onerandomusername commented 3 years ago

Relevant Issues

Closes #52

Description

See the body of #52 for more details while this is a draft.

codecov[bot] commented 3 years ago

Codecov Report

Merging #53 (8eff437) into main (4b07917) will decrease coverage by 6.28%. The diff coverage is 51.51%.

:exclamation: Current head 8eff437 differs from pull request most recent head 565f08d. Consider uploading reports for the commit 565f08d to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
- Coverage   70.90%   64.62%   -6.29%     
==========================================
  Files          33       40       +7     
  Lines        1619     2400     +781     
  Branches      199      319     +120     
==========================================
+ Hits         1148     1551     +403     
- Misses        439      805     +366     
- Partials       32       44      +12     
Impacted Files Coverage Δ
modmail/utils/users.py 20.00% <20.00%> (ø)
modmail/extensions/threads.py 30.93% <30.93%> (ø)
modmail/bot.py 40.32% <100.00%> (+1.47%) :arrow_up:
modmail/config.py 96.82% <100.00%> (-0.10%) :arrow_down:
modmail/utils/threads/__init__.py 100.00% <100.00%> (ø)
modmail/utils/threads/decorators.py 100.00% <100.00%> (ø)
modmail/utils/threads/errors.py 100.00% <100.00%> (ø)
modmail/utils/threads/models.py 100.00% <100.00%> (ø)
tests/modmail/extensions/test_threads.py 100.00% <100.00%> (ø)
modmail/utils/embeds.py 86.84% <0.00%> (+5.26%) :arrow_up:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 10a6468...565f08d. Read the comment docs.

onerandomusername commented 2 years ago

This pr is now feature frozen.

Cosmetic changes will be fixed in later pull requests.

onerandomusername commented 2 years ago

Doesn't open thread create embed as advertised. Needs to quote the original message with >, and link to the thread with a link for compatibility reasons.

@bast0006 I don't want to add the > to prevent issues with markdown formatting.

Linking to the thread is not needed since the threads are made off of that message-- it will have the thread attached to itself, so a link would just be linking to itself.

bast0006 commented 2 years ago

Doesn't open thread create embed as advertised. Needs to quote the original message with >, and link to the thread with a link for compatibility reasons.

@bast0006 I don't want to add the > to prevent issues with markdown formatting.

Linking to the thread is not needed since the threads are made off of that message-- it will have the thread attached to itself, so a link would just be linking to itself.

@onerandomusername we do need to link the thread, because in the past mobile clients have had compatibility issues with accessing into threads, and it'd be nice to have an easy link in case it gets broken in the future.

As for the >, there's only two cases it breaks: code blocks, and with ` formatting. I think I can write something to make this behavior nicer so we can include in the future.

onerandomusername commented 2 years ago

Unfortunately, I have learned that I need to refactor a large portion of this pull...

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-5.01%) to 69.988% when pulling 565f08d16a9280927452e9aefe1ca30c4c3d4675 on feat/threads into 10a64686539acbbf2a1548334c52e0e218f1cdb4 on main.