工具
timeout
¶
超时返回 success
Attributes:
Name | Type | Description |
---|---|---|
secconds |
float
|
超时时间 |
Source code in zgrobot/utils.py
byte2int(s, index=0)
¶
Get the ASCII int value of a character in a string.
:param s: a string :param index: the position of desired character
:return: ASCII int value
is_string(value)
¶
pay_sign_dict(appid, pay_sign_key, add_noncestr=True, add_timestamp=True, add_appid=True, **kwargs)
¶
支付参数签名
Source code in zgrobot/utils.py
str2button(button_txt, reply_txt)
¶
将普通文本包装为智能按钮
Parameters:
Name | Type | Description | Default |
---|---|---|---|
button_txt |
str
|
想要转换为智能按钮的文本 |
required |
reply_txt |
str
|
按下智能按钮后回复的文本 |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
智能按钮的字符串 |