mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-24 05:16:09 +00:00
style: restrict line-length
This commit is contained in:
@@ -16,10 +16,7 @@ class AtBotRule(rule_model.GroupRespondRule):
|
||||
rule_dict: dict,
|
||||
query: core_entities.Query,
|
||||
) -> entities.RuleJudgeResult:
|
||||
if (
|
||||
message_chain.has(platform_message.At(query.adapter.bot_account_id))
|
||||
and rule_dict['at']
|
||||
):
|
||||
if message_chain.has(platform_message.At(query.adapter.bot_account_id)) and rule_dict['at']:
|
||||
message_chain.remove(platform_message.At(query.adapter.bot_account_id))
|
||||
|
||||
if message_chain.has(
|
||||
|
||||
@@ -18,6 +18,4 @@ class RandomRespRule(rule_model.GroupRespondRule):
|
||||
) -> entities.RuleJudgeResult:
|
||||
random_rate = rule_dict['random']
|
||||
|
||||
return entities.RuleJudgeResult(
|
||||
matching=random.random() < random_rate, replacement=message_chain
|
||||
)
|
||||
return entities.RuleJudgeResult(matching=random.random() < random_rate, replacement=message_chain)
|
||||
|
||||
Reference in New Issue
Block a user