mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
更新 message.py
This commit is contained in:
@@ -160,7 +160,7 @@ class ChannelCapabilities:
|
|||||||
"""
|
"""
|
||||||
channel: MessageChannel
|
channel: MessageChannel
|
||||||
capabilities: Set[ChannelCapability]
|
capabilities: Set[ChannelCapability]
|
||||||
max_buttons_per_row: int = 2
|
max_buttons_per_row: int = 5
|
||||||
max_button_rows: int = 10
|
max_button_rows: int = 10
|
||||||
max_button_text_length: int = 30
|
max_button_text_length: int = 30
|
||||||
fallback_enabled: bool = True
|
fallback_enabled: bool = True
|
||||||
@@ -285,7 +285,7 @@ class ChannelCapabilityManager:
|
|||||||
获取每行最大按钮数
|
获取每行最大按钮数
|
||||||
"""
|
"""
|
||||||
channel_caps = cls.get_capabilities(channel)
|
channel_caps = cls.get_capabilities(channel)
|
||||||
return channel_caps.max_buttons_per_row if channel_caps else 4
|
return channel_caps.max_buttons_per_row if channel_caps else 5
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_max_button_rows(cls, channel: MessageChannel) -> int:
|
def get_max_button_rows(cls, channel: MessageChannel) -> int:
|
||||||
@@ -293,7 +293,7 @@ class ChannelCapabilityManager:
|
|||||||
获取最大按钮行数
|
获取最大按钮行数
|
||||||
"""
|
"""
|
||||||
channel_caps = cls.get_capabilities(channel)
|
channel_caps = cls.get_capabilities(channel)
|
||||||
return channel_caps.max_button_rows if channel_caps else 5
|
return channel_caps.max_button_rows if channel_caps else 10
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_max_button_text_length(cls, channel: MessageChannel) -> int:
|
def get_max_button_text_length(cls, channel: MessageChannel) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user