Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2024-03-23 23:40:28 +08:00 committed by GitHub
parent cbe28a8cbf
commit e36a3ea605
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 15 deletions

View file

@ -70,6 +70,7 @@ async def get_target(target_id: str):
ban = target.get_option('ban')
typo_check = target.get_option('typo_check')
dice_dc_reversed = target.get_option('dice_dc_reversed')
dice_default_face = target.get_option('dice_default_face')
wiki_fandom_addon = target.get_option('wiki_fandom_addon')
wordle_dark_theme = target.get_option('wordle_dark_theme')
@ -90,6 +91,7 @@ async def get_target(target_id: str):
'ban': ban,
'typoCheck': typo_check,
'diceDCReversed': dice_dc_reversed,
'diceDefaultFace': dice_default_face,
'wordleDarkTheme': wordle_dark_theme,
'wiki': {
'fandomAddon': wiki_fandom_addon,

View file

@ -71,8 +71,6 @@ coin_faceup_rate = 4997
coin_facedown_rate = 4997
dice_limit = 100
dice_roll_limit = 10
dice_mod_max = 10000
dice_mod_min = -10000
dice_output_count = 50
dice_output_len = 200
dice_detail_count = 5

View file

@ -537,13 +537,9 @@ pip3 install matrix-nio[e2e] ; PIP
`dice_roll_limit = 100` - 投掷骰子的最大次数。
`dice_mod_max = 10000` - 投掷骰子的最大调节值
`dice_output_count = 50` - 输出时的最大数据量,超过则无法正常显示
`dice_mod_min = -10000` - 投掷骰子的最小调节值。
`dice_output_cnt = 50` - 输出时的最大数据量,超过则无法正常显示。
`dice_detail_cnt= 5` - 多次投掷骰子的总数,超过则不再显示详细信息。
`dice_detail_count= 5` - 多次投掷骰子的总数,超过则不再显示详细信息。
`dice_count_limit = 10` - 骰子表达式最多的项数。

View file

@ -384,13 +384,9 @@ pip3 install matrix-nio[e2e] ; PIP
`dice_roll_limit = 100` - 投掷骰子的最大次数。
`dice_mod_max = 10000` - 投掷骰子的最大调节值
`dice_output_count = 50` - 输出时的最大数据量,超过则无法正常显示
`dice_mod_min = -10000` - 投掷骰子的最小调节值。
`dice_output_cnt = 50` - 输出时的最大数据量,超过则无法正常显示。
`dice_detail_cnt= 5` - 多次投掷骰子的总数,超过则不再显示详细信息。
`dice_detail_count= 5` - 多次投掷骰子的总数,超过则不再显示详细信息。
`dice_count_limit = 10` - 骰子表达式最多的项数。

View file

@ -232,8 +232,8 @@ async def process_expression(msg, expr: str, times: int, dc):
def parse_dice_expression(msg, dices):
dice_item_list = []
patterns = [
r'((?:\d+)?D(?:\d+|\%)?(?:(?:K|Q)?(?:\d+)?)?)', # 普通骰子
r'((?:\d+)?D?F)', # 命运骰子
r'((?:\d+)?D(?:\d+|\%)?(?:(?:K|Q)?(?:\d+)?)?)', # 普通骰子
r'(\d+)', # 数字
r'(\(|\))', # 括号
]