This repository was archived by the owner on Sep 2, 2022. It is now read-only.
Replies: 1 comment 4 replies
-
|
あーでもこれ d.py の check はこういう想定なんかなー。 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/Huyu2239/ExpandBot/blob/f28edd6de2954a6bbb2a4a37cff8b61103f80353/lib/check.py#L1-L10
コマンドとクエリは分けた方がいい。(ここでは、メッセージ送信はコマンドで、実行可否結果の取得がクエリ)
cf. https://bliki-ja.github.io/CommandQuerySeparation/
"Check" は名前が明らかにクエリなのに、中でメッセージ送信とかされるのはかなりビビる。悪い意味で開発者の予想を裏切る。
開発者の予想を裏切らないためには、とにかく関数の名前で示したこと以外のことはしないのがいい。
Beta Was this translation helpful? Give feedback.
All reactions