mirror of https://github.com/zhongshmx/JX3BOT.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
642 B
29 lines
642 B
# -*- coding: utf-8 -*
|
|
|
|
"""
|
|
@Software : PyCharm
|
|
@File : config.py
|
|
@Author : 梦影
|
|
@Time : 2021/04/28 19:56:08
|
|
"""
|
|
|
|
from plugin.common import bot
|
|
import random
|
|
|
|
|
|
class extend:
|
|
@staticmethod
|
|
async def rand(): # 文字触发几率 # 随机模块
|
|
if random.randint(1, 100) <= bot.config.RANDOM_MAX_VALUE:
|
|
result = True
|
|
else:
|
|
result = False
|
|
return result
|
|
|
|
@staticmethod
|
|
async def chat(): # 聊天触发几率 # 随机模块
|
|
if random.randint(1, 100) <= bot.config.NLPCHAT_MAX_VALUE:
|
|
result = True
|
|
else:
|
|
result = False
|
|
return result
|
|
|