Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Apr 27, 2022. It is now read-only.
New haracho message monitor - #137
Merged
loxygenK merged 11 commits intoJun 10, 2020
Merged
Conversation
loxygenK
commented
Jun 8, 2020
ContributorAuthor
どうして同じコミットが2つあるんですか? |
isso0424
suggested changes
Jun 8, 2020
| """.replace(" ", "") | ||
| async def delete_notify(message: discord.Message): |
Member
There was a problem hiding this comment.
delete_notifyはnotify_message_deleteでよくね
| HORIZONTAL_LINE = "------------------------------\n" | ||
| async def edit_notify( |
Member
There was a problem hiding this comment.
deleteと同様にnotify_message_editで良いと思う
| after_lines: List[str] | ||
| ): | ||
| raw_diff = list(difflib.Differ().compare(before_lines, after_lines)) | ||
| modified_diff = [x for x in raw_diff if x[:1] in "+-"] |
| ``` | ||
| {} | ||
| ``` | ||
| """.replace(" ", "") |
isso0424
suggested changes
Jun 9, 2020
| async def on_guild_role_create(self, role): | ||
| pass | ||
| message.author.display_name, | ||
| message.content | ||
| ) | ||
| ) |
| HORIZONTAL_LINE if (i * 2) != len(modified_diff) - 2 else "" | ||
| ) | ||
| return generated_diff_text.strip() |
| } | ||
| generated_diff_text = "" | ||
| for i in range(len(modified_diff) // 2): |
Member
There was a problem hiding this comment.
これはlen(diff_dict["+"])すればマジックナンバーが要らなくなる
| after_lines: List[str] | ||
| ): | ||
| raw_diff = list(difflib.Differ().compare(before_lines, after_lines)) | ||
| modified_diff = [x for x in raw_diff if x[:1] in "+-"] |
| generated_diff_text += DIFF_PAIR_TEMPLATE.format( | ||
| diff_dict["-"][i], | ||
| diff_dict["+"][i], | ||
| HORIZONTAL_LINE if (i * 2) != len(modified_diff) - 2 else "" |
Member
There was a problem hiding this comment.
ここmodified_diffをdiff_dict["+"]にすればi * 2である意味が無いと思われ
loxygenK
commented
Jun 9, 2020
ContributorAuthor
やったぜ。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
いろいろガバってコミット履歴ぐっちゃぐちゃなのでRequest Change投げてくれたらRebaseして投げ直します
し ん ど い