-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: URLに関する置換処理を作成 #31
Conversation
CIが落ちていますが、これは #32 によるものです。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コード以外
- models/response 以下は discord/ twitter/ などのパッケージに分かれているのに、models/original でなっていないのはなぜですか?
- TwitterOembed じゃなくて TwitterOEmbed ではないでしょうか
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UrlReplacer.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
追加
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/UserMentionReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/RoleMentionReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/RegexReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/ChannelMentionReplacer.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/jaoafa/vcspeaker/voicetext/textreplacers/AliasReplacer.kt
Outdated
Show resolved
Hide resolved
たしかに...。models/responses/*.kt とするか、discord/ twitter/ でパッケージを分けるか、どちらがお好みですか?
|
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
Co-authored-by: yuuaHP <identity@yuua.dev>
Co-authored-by: yuuaHP <identity@yuua.dev>
Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
…rlReplacer.kt Co-authored-by: yuuaHP <identity@yuua.dev>
クソ大量にcommitしてしまったのでマージするときはsquashでお願いします(デフォルトでsquashでもいいと思うけど) |
できれば、なにかしらフォーマッタできる設定が入ると嬉しいわね…。IDEAのフォーマット設定とか |
どういう? |
パッケージ名の方が密度低いと思うので分けたいです |
フォーマット設定はこの辺を想像しています |
デフォルトじゃ足りないところがある感じですか? |
たとえぱ、指摘いただいたRegexの改行とかってIDEAの自動フォーマットをかけた上でアレなんですよね(デフォルトは一定文字数を漏れた行だけが改行される仕様だったはず) |
やってみます |
unused argumentのところ、引数1つと2つ両方受け付けますよみたいな書き方ないですかね? |
アノテーションかけるとそのメソッド全体でかかる気がしててなんかちょっとですよねえ |
この前 reflection で無理やり入れられないかと思って試してみましたが無理でした |
一応、guildIdのunused対応はこのPRの対象外とさせてください。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
じゃあマージします
以下の変更を含みます。
Kotlinなんもわからんなので、より良い書き方とかあればガンガンレビューください。
textreplacers
ディレクトリの名前が微妙な気がしますが、単語の区切り文字を下手に入れるとダメそうな気がして…。voicetext/TextProcessor.kt
にあった置換処理をvoicetext/textreplacers/*.kt
に切り出しvoicetext/textreplacers/BaseReplacer.kt
を作成voicetext/textreplacers/UrlReplacer.kt
を新規作成