• 欢迎来到小可 · Wiki,人人可编辑的,多平台聊天机器人“小可”的官方文档资源。
  • 小可很可爱,请给我们打钱
  • 原 MkDocs 已迁入本站。若发现 404 属正常现象,请点击左上角搜索您想要的模块。

配置文件:修订间差异

来自小可 · Wiki,人人可编辑的,QQ机器人“小可”的官方文档资源
无编辑摘要
无编辑摘要
 
(未显示同一用户的14个中间版本)
第9行: 第9行:
[secret]
[secret]
db_path = "mysql+pymysql://"
db_path = "mysql+pymysql://"
check_accessKeyId =
check_access_key_id =
check_accessKeySecret =
check_access_key_secret =
web_render =
web_render =
proxy =
proxy =
dc_token =
discord_token =
tg_token =
telegram_token =
kook_token =
kook_token =
matrix_device_id =
matrix_device_id =
第20行: 第20行:
matrix_megolm_backup_passphrase =
matrix_megolm_backup_passphrase =
curseforge_api_key =
curseforge_api_key =
diving_fish_developer_token =
exchange_rate_api_key =
exchange_rate_api_key =
openai_api_key =
openai_api_key =
第35行: 第36行:
disabled_bots = ["",]
disabled_bots = ["",]
report_targets = ["",]
report_targets = ["",]
use_shamrock = false
locale = "zh_cn"
locale = "zh_cn"
timezone_offset = "+8"
timezone_offset = "+8"
bug_report_url = "https://s.wd-ljt.com/botreportbug"
bug_report_url = "https://s.wd-ljt.com/botreportbug"
donate_url = "https://afdian.net/@teahouse"
donate_url = "https://afdian.com/a/teahouse"
help_url = "https://bot.teahouse.team"
help_url = "https://bot.teahouse.team"
issue_url = "https://github.com/Teahouse-Studios/bot/issues/new/choose"
help_page_url = "https://bot.teahouse.team/wiki/${module}"
issue_url = "https://github.com/Teahouse-Studios/akari-bot/issues/new/choose"
locale_url = "https://www.crowdin.com/project/akari-bot"
locale_url = "https://www.crowdin.com/project/akari-bot"
wiki_whitelist_url = "https://s.wd-ljt.com/botwhitelist"
wiki_whitelist_url = "https://s.wd-ljt.com/botwhitelist"
第47行: 第48行:
qq_account = 2314163511
qq_account = 2314163511
qq_host = "127.0.0.1:11451"
qq_host = "127.0.0.1:11451"
qq_frame_type = "go-cqhttp"
qq_disable_temp_session = false
qq_disable_temp_session = false
qq_allow_approve_friend = true
qq_allow_approve_friend = true
qq_allow_approve_group_invite = true
qq_allow_approve_group_invite = true
qq_enable_listening_self_message = false
qq_enable_listening_self_message = false
matrix_device_name = 
qq_limited_emoji = 10060
matrix_homeserver = 
qq_typing_emoji = 181
matrix_device_name =
matrix_homeserver =
matrix_user = "@akaribot:matrix.org"
matrix_user = "@akaribot:matrix.org"
allow_request_private_ip = false
allow_request_private_ip = false
第58行: 第62行:
no_confirm = false
no_confirm = false
slower_schedule = false
slower_schedule = false
enable_commit_url = true
enable_dirty_check = true
enable_dirty_check = true
enable_rickroll = true
enable_rickroll = true
enable_shuffle_joke =
shuffle_rate = 0.1
rickroll_msg = "https://wdf.ink/6OUp"
rickroll_msg = "https://wdf.ink/6OUp"
??? =
shuffle_rate = 0.1
enable_urlmanager = true
enable_urlmanager = true
enable_tos = false
enable_tos = false
第87行: 第92行:
== 属性 ==
== 属性 ==
=== secret ===
=== secret ===
 在 <code>secret</code>  类中填入 的内容,当机器人发送的消息中存在时会被拦截。
 在 <code>secret</code>  储存 内容为私有 内容,当机器人发送的消息中存在 这些内容 时会被 自动 拦截。 
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! 属性
! 属性
! 使用模块
! 使用模块
! 类型
! 默认值
! 默认值
! 描述
! 描述
|-
|-
| db_path
| {{Instructor param|db_path|str}}
| str
| "mysql+pymysql://"
| "mysql+pymysql://"
| 数据库 路径 ,用于存储用户数据。 
| 数据库 连接串 ,用于存储用户数据。 
|-
|-
| check_accessKeyId
| {{Instructor param|check_access_key_id|str}}
|
|
| str
|
|
| 调用阿里云内容安全服务 API 时需要的 AccessKey ID。 
| 调用阿里云内容安全服务 API 时需要的 AccessKey ID。 
|-
|-
| check_accessKeySecret
| {{Instructor param|check_access_key_secret|str}}
|
|
| str
|
|
| 调用阿里云内容安全服务 API 时需要的 AccessKey Secret。 
| 调用阿里云内容安全服务 API 时需要的 AccessKey Secret。 
|-
|-
| web_render
| {{Instructor param|web_render|str}}
|
|
| str
| [[Webrender]] 的地址(IP 或域名)及端口。
| [[Webrender]] 的地址(IP 或域名)及端口。
|-
|-
| proxy
| {{Instructor param|proxy|str}}
| str
| 代理服务的地址(IP 或域名)及端口。
| 代理服务的地址(IP 或域名)及端口。
|-
|-
| dc_token
| {{Instructor param|discord_token|str}}
| str
|
|
| Discord 机器人令牌。
| Discord 机器人令牌。
|-
|-
| kook_token
| {{Instructor param|kook_token|str}}
|
|
| str
|
|
| KOOK 机器人令牌。
| KOOK 机器人令牌。
|-
|-
| tg_token
| {{Instructor param|telegram_token|str}}
| str
|
|
| Telegram 机器人令牌。
| Telegram 机器人令牌。
|-
|-
| matrix_device_id
| {{Instructor param|matrix_device_id|str}}
| str
|
|
| Matrix 机器人设备 ID。
| Matrix 机器人设备 ID。
|-
|-
| matrix_token
| {{Instructor param|matrix_token|str}}
| str
|
|
| Matrix 机器人令牌。
| Matrix 机器人令牌。
|-
|-
| matrix_megolm_backup_passphrase
| {{Instructor param|matrix_megolm_backup_passphrase|str}}
| str
|
|
| Matrix 机器人的 Megolm 备份密码短语。
| Matrix 机器人的 Megolm 备份密码短语。
|-
|-
| curseforge_api_key
| {{Instructor param|curseforge_api_key|str}}
| <code>[[mod_dl]]</code>
| <code>[[mod_dl]]</code>
| str
|
|
| Curseforge API 密钥。
| Curseforge API 密钥。
|-
|-
| exchange_rate_api_key
| {{Instructor param|diving_fish_developer_token|str}}
| <code>[[maimai]]</code><br><code>[[maimai_regex]]</code>
|
| Diving-Fish 查分器开发者令牌。
|-
| {{Instructor param|exchange_rate_api_key|str}}
| <code>[[exchange_rate]]</code><br><code>[[petal]]</code>
| <code>[[exchange_rate]]</code><br><code>[[petal]]</code>
| str
|
|
| ExchangeRate-API 密钥。
| {{Instructor param|ExchangeRate-API 密钥。
|-
|-
| openai_api_key
| {{Instructor param|openai_api_key|str}}
| <code>[[ask]]</code><br><code>[[summary]]</code>
| <code>[[ask]]</code><br><code>[[summary]]</code>
| str
|
|
| OpenAI API 密钥。
| OpenAI API 密钥。
|-
|-
| osu_api_key
| {{Instructor param|osu_api_key|str}}
| <code>[[osu]]</code>
| <code>[[osu]]</code>
| str
|
|
| Osu! API 密钥。
| Osu! API 密钥。
|-
|-
| wolfram_alpha_appid
| {{Instructor param|wolfram_alpha_appid|str}}
| <code>[[ask]]</code><br><code>[[wolframalpha]]</code>
| <code>[[ask]]</code><br><code>[[wolframalpha]]</code>
| str
|
|
| WolframAlpha API 的 App ID。
| WolframAlpha API 的 App ID。
|-
|-
| jwt_secret
| {{Instructor param|jwt_secret|str}}
| str
|
|
第204行: 第196行:
! 属性
! 属性
! 使用模块
! 使用模块
! 类型
! 默认值
! 默认值
! 描述
! 描述
|-
|-
| api_port
| {{Instructor param|api_port|int}}
| int
| 5000
| 5000
| 机器人 API 端口。
| 机器人 API 端口。
|-
|-
| base_superuser
| {{Instructor param||list}}{{Instructor param|base_superuser|str}}
| list, str
| ["QQ<nowiki>|</nowiki>2596322644",]
| ["QQ<nowiki>|</nowiki>2596322644",]
| 机器人主超级用户,输入用户对应的 ID。可使用 <code>~[[whoami]]</code> 命令查看自己的 ID。 
| 机器人主超级用户,输入用户对应的 ID。可使用 <code>~[[whoami]]</code> 命令查看自己的 ID。 
|-
|-
| debug
| {{Instructor param|debug|bool}}
| bool
| false
| false
| 设置是否启用 Logger 的除错模式。 
| 设置是否启用 Logger 的除错模式。 
|-
|-
| cache_path
| {{Instructor param|cache_path|str}}
| str
| "./cache/"
| "./cache/"
| 图片等的缓存路径。 
| 图片等的缓存路径。 
|-
|-
| command_prefix
| {{Instructor param|command_prefix|list}}
| list
| ["~", "~",]
| ["~", "~",]
| 默认命令前缀列表。 
| 默认命令前缀列表。 
|-
|-
| confirm_command
| {{Instructor param|confirm_command|list}}
| list
| ["是", "对", "對", "yes", "Yes", "YES", "y", "Y",]
| ["是", "对", "對", "yes", "Yes", "YES", "y", "Y",]
| 命令确认词列表。 
| 命令确认词列表。 
|-
|-
| disabled_bots
| {{Instructor param|disabled_bots|list}}
| list
| ["",]
| ["",]
| 机器人禁用的平台列表,平台名称为 <code>./bots/</code> 目录下对应的文件名。
| 机器人禁用的平台列表,平台名称为 <code>./bots/</code> 目录下对应的文件名。
|-
|-
| report_targets
| {{Instructor param|report_targets|list}}
| list
| ["",]
| ["",]
| 机器人发送事件回报的对话列表。 
| 机器人发送事件回报的对话列表。 
|-
|-
| use_shamrock
| {{Instructor param|locale|str}}
| bool
| false
| 设置是否使用了 OpenShamrock,以修改部分运行方式。
|-
| locale
| str
| "zh_cn"
| "zh_cn"
| 机器人默认使用的语言。
| 机器人默认使用的语言。
|-
|-
| timezone_offset
| {{Instructor param|timezone_offset|str}}
| str
| "+8"
| "+8"
| 机器人默认时区偏移量。 
| 机器人默认时区偏移量。 
|-
|-
| bug_report_url
| {{Instructor param|bug_report_url|str}}
| str
| "https://s.wd-ljt.com/botreportbug"
| "https://s.wd-ljt.com/botreportbug"
| 汇报错误的网址。
| 汇报错误的网址。
|-
|-
| donate_url
| {{Instructor param|donate_url|str}}
| <code>[[help]]</code>
| <code>[[help]]</code>
| str
| "https://afdian.com/a/teahouse"
| "https://afdian.net/@teahouse"
| 赞助的网址。
| 赞助的网址。
|-
|-
| help_url
| {{Instructor param|help_url|str}}
| <code>[[help]]</code>
| <code>[[help]]</code>
| str
| "https://bot.teahouse.team"
| "https://bot.teahouse.team"
| 帮助文档的网址。
| 帮助文档的网址。
|-
|-
| issue_url
| {{Instructor param|help_page_url|str}}
| <code>[[help]]</code>
| "https://bot.teahouse.team/wiki/${module}"
| 具体模块的帮助文档网址,<code>${module}</code> 会被替换为模块名称。留空则将 <code>help_url</code> 之后加入模块名称。
|-
| {{Instructor param|issue_url|str}}
| str
| "https://github.com/Teahouse-Studios/akari-bot/issues/new/choose"
| "https://github.com/Teahouse-Studios/bot/issues/new/choose"
| 提交问题(如封禁申诉等)的网址。
| 提交问题(如封禁申诉等)的网址。
|-
|-
| locale_url
| {{Instructor param|locale_url|str}}
| <code>[[locale]]</code>
| <code>[[locale]]</code>
| str
| "https://www.crowdin.com/project/akari-bot"
| "https://www.crowdin.com/project/akari-bot"
| 提供多语言贡献的网址。
| 提供多语言贡献的网址。
|-
|-
| wiki_whitelist_url
| {{Instructor param|wiki_whitelist_url|str}}
| <code>[[wiki]]</code>
| <code>[[wiki]]</code>
| str
| "https://s.wd-ljt.com/botwhitelist"
| "https://s.wd-ljt.com/botwhitelist"
| 申请 Wiki 白名单的网址。
| 申请 Wiki 白名单的网址。
|-
|-
| web_render_local
| {{Instructor param|web_render_local|str}}
| str
| 本地 Webrender 的地址,若与 <code>web_render</code> 相同则留空。
| 本地 Webrender 的地址,若与 <code>web_render</code> 相同则留空。
|-
|-
| qq_account
| {{Instructor param||int}}{{Instructor param|qq_account|str}}
| int, str
| 2314163511
| 2314163511
| 机器人的 QQ 号。
| 机器人的 QQ 号。
|-
|-
| qq_host
| {{Instructor param|qq_host|str}}
| str
| "127.0.0.1:11451"
| "127.0.0.1:11451"
| 用于 go-cqhttp 反向连接的 IP 地址及端口。
| 用于 go-cqhttp 反向连接的 IP 地址及端口。
|-
|-
| qq_disable_temp_session
| {{Instructor param|qq_frame_type|str}}
|
| "go-cqhttp"
| 告诉机器人目前正在使用的 QQ 框架。
|-
| {{Instructor param|qq_disable_temp_session|bool}}
| bool
| false
| false
| 设置是否禁用机器人在 QQ 的临时会话。 
| 设置是否禁用机器人在 QQ 的临时会话。 
|-
|-
| qq_allow_approve_friend
| {{Instructor param|qq_allow_approve_friend|bool}}
| bool
| true
| true
| 设置是否在 QQ 上自动同意普通用户加好友申请。
| 设置是否在 QQ 上自动同意普通用户加好友申请。
|-
|-
| qq_allow_approve_group_invite
| {{Instructor param|qq_allow_approve_group_invite|bool}}
| bool
| true
| true
| 设置是否在 QQ 上自动同意普通用户加群申请。
| 设置是否在 QQ 上自动同意普通用户加群申请。
|-
|-
| qq_enable_listening_self_message
| {{Instructor param||int}}{{Instructor param|qq_limited_emoji|str}}
|
| false
| QQ 被限制发送消息时回应的[https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#EmojiType 表情 ID]。
|-
| {{Instructor param||int}}{{Instructor param|qq_typing_emoji|str}}
|
| false
| QQ 正在发送消息时回应的[https://bot.q.qq.com/wiki/develop/api-v2/openapi/emoji/model.html#EmojiType 表情 ID]。
|-
| {{Instructor param|qq_enable_listening_self_message|bool}}
| bool
| false
| false
| 设置是否启用 QQ 的自我消息处理。
| 设置是否启用 QQ 的自我消息处理。
|-
|-
| matrix_device_name
| {{Instructor param|matrix_device_name|str}}
| str
|
|
| Matrix 机器人设备名称。
| Matrix 机器人设备名称。
|-
|-
| matrix_homeserver
| {{Instructor param|matrix_homeserver|str}}
| str
|
|
| Matrix 服务器 URL。
| Matrix 服务器 URL。
|-
|-
| matrix_user
| {{Instructor param|matrix_user|str}}
| str
| "@akaribot:matrix.org"
| "@akaribot:matrix.org"
| Matrix 机器人用户 ID(含<code>@</code>与<code>:</code>)。
| Matrix 机器人用户 ID(含<code>@</code>与<code>:</code>)。
|-
|-
| allow_request_private_ip
| {{Instructor param|allow_request_private_ip|bool}}
| bool
| false
| false
| 设置是否允许私有 IP 请求网站。
| 设置是否允许私有 IP 请求网站。
|-
|-
| allow_reload_base
| {{Instructor param|allow_reload_base|bool}}
| <code>[[module]]</code>
| <code>[[module]]</code>
| bool
| false
| false
| 设置是否允许重新加载基础模块。
| 设置是否允许重新加载基础模块。
|-
|-
| no_confirm
| {{Instructor param|no_confirm|bool}}
| bool
| false
| false
| 设置是否跳过确认消息直接执行命令。
| 设置是否跳过确认消息直接执行命令。
|-
|-
| slower_schedule
| {{Instructor param|slower_schedule|bool}}
| bool
| false
| false
| 设置是否让计划任务模块使用更长的时间间隔执行。 
| 设置是否让计划任务模块使用更长的时间间隔执行。 
|-
|-
| enable_dirty_check
| {{Instructor param|enable_commit_url|bool}}
|
| true
| 设置是否显示版本 Commit URL。
|-
| {{Instructor param|enable_dirty_check|bool}}
| bool
| true
| true
| 设置是否启用屏蔽词检查。
| 设置是否启用屏蔽词检查。
|-
|-
| enable_rickroll
| {{Instructor param|enable_rickroll|bool}}
| bool
| true
| true
| 设置请求被拦截时是否输出内容。
| 设置请求被拦截时是否输出内容。
|-
|-
| rickroll_msg
| {{Instructor param|enable_shuffle_joke|bool}}
| str
| "https://wdf.ink/6OUp"
| 请求被拦截时输出的内容。
|-
| ???
| bool
| 设置是否启用内置愚人节玩笑。若留空则会在 4 月 1 日启用愚人节玩笑。
| 设置是否启用内置愚人节玩笑。若留空则会在 4 月 1 日启用愚人节玩笑。
|-
|-
| shuffle_rate
| {{Instructor param||float}}{{Instructor param|shuffle_rate|int}}
| float, int
| 0.1
| 0.1
| 设置愚人节玩笑的文字打乱频率,输入为 0-1 之间。
| 设置愚人节玩笑的文字打乱频率,输入为 0-1 之间。
|-
|-
| enable_urlmanager
| {{Instructor param|rickroll_msg|bool}}
|
| "https://wdf.ink/6OUp"
| 请求被拦截时输出的内容。
|-
| {{Instructor param|enable_urlmanager|bool}}
| <code>[[wiki]]</code><br><code>[[wiki_audit]]</code>
| <code>[[wiki]]</code><br><code>[[wiki_audit]]</code>
| bool
| true
| true
| 设置是否启用 URL 管理,禁用后无法使用 <code>[[wiki_audit]]</code> 命令。 
| 设置是否启用 URL 管理,禁用后无法使用 <code>[[wiki_audit]]</code> 命令。 
|-
|-
| enable_tos
| {{Instructor param|enable_tos|bool}}
| bool
| false
| false
| 设置是否启用内置的违反服务条款检查。 
| 设置是否启用内置的违反服务条款检查。 
|-
|-
| tos_waring_counts
| {{Instructor param|tos_waring_counts|int}}
| int
| 5
| 5
| 设置用户违反服务条款的最高警告次数。 
| 设置用户违反服务条款的最高警告次数。 
|-
|-
| tos_temp_ban_time
| {{Instructor param|tos_temp_ban_time|int}}
| int
| 300
| 300
| 设置用户违反服务条款后的临时限制时间。
| 设置用户违反服务条款后的临时限制时间。
|-
|-
| enable_analytics
| {{Instructor param|enable_analytics|bool}}
| <code>[[analytics]]</code>
| <code>[[analytics]]</code>
| bool
| true
| true
| 设置是否启用 <code>analytics</code> 模块相关命令。 
| 设置是否启用 <code>analytics</code> 模块相关命令。 
|-
|-
| enable_eval
| {{Instructor param|enable_eval|bool}}
| <code>[[eval]]</code>
| <code>[[eval]]</code>
| bool
| true
| true
| 设置是否启用 <code>eval</code> 模块相关命令。
| 设置是否启用 <code>eval</code> 模块相关命令。
|-
|-
| enable_petal
| {{Instructor param|enable_petal|bool}}
| <code>[[petal]]</code>
| <code>[[petal]]</code>
| bool
| true
| true
| 设置是否启用花瓣。
| 设置是否启用花瓣。
|-
|-
| enable_get_petal
| {{Instructor param|enable_get_petal|bool}}
| <code>[[petal]]</code>
| <code>[[petal]]</code>
| bool
| true
| true
| 设置是否启用获取花瓣途径。
| 设置是否启用获取花瓣途径。
|-
|-
| gained_petal_limit
| {{Instructor param|gained_petal_limit|int}}
| <code>[[petal]]</code>
| <code>[[petal]]</code>
| int
| 10
| 10
| 设置一天内获得的花瓣数量限制。
| 设置一天内获得的花瓣数量限制。
|-
|-
| lost_petal_limit
| {{Instructor param|lost_petal_limit|int}}
| <code>[[petal]]</code>
| <code>[[petal]]</code>
| int
| 5
| 5
| 设置一天内失去的花瓣数量限制。
| 设置一天内失去的花瓣数量限制。
|-
|-
| coin_limit
| {{Instructor param|coin_limit|int}}
| <code>[[coin]]</code>
| <code>[[coin]]</code>
| int
| 10000
| 10000
| 一次可投掷的硬币最大个数。 
| 一次可投掷的硬币最大个数。 
|-
|-
| coin_faceup_rate
| {{Instructor param|coin_faceup_rate|int}}
| <code>[[coin]]</code>
| <code>[[coin]]</code>
| int
| 4994
| 4994
| 硬币正面朝上的概率,按一万分之几计算。 
| 硬币正面朝上的概率,按一万分之几计算。 
|-
|-
| coin_facedown_rate
| {{Instructor param|coin_facedown_rate|int}}
| <code>[[coin]]</code>
| <code>[[coin]]</code>
| int
| 4994
| 4994
| 硬币反面朝上的概率,按一万分之几计算。 
| 硬币反面朝上的概率,按一万分之几计算。 
|-
|-
| dice_limit
| {{Instructor param|dice_limit|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 100
| 100
| 一次可投掷的骰子最大个数。
| 一次可投掷的骰子最大个数。
|-
|-
| dice_roll_limit
| {{Instructor param|dice_roll_limit|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 10
| 10
| 投掷骰子的最大次数。
| 投掷骰子的最大次数。
|-
|-
| dice_output_count
| {{Instructor param|dice_output_count|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 50
| 50
| 输出时的最大数据量,超过则无法正常显示。
| 输出时的最大数据量,超过则无法正常显示。
|-
|-
| dice_output_len
| {{Instructor param|dice_output_len|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 200
| 200
| 输出时的最大长度,超过则无法正常显示。
| 输出时的最大长度,超过则无法正常显示。
|-
|-
| dice_detail_count
| {{Instructor param|dice_detail_count|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 5
| 5
| 多次投掷骰子的总数,超过则不再显示详细信息。
| 多次投掷骰子的总数,超过则不再显示详细信息。
|-
|-
| dice_count_limit
| {{Instructor param|dice_count_limit|int}}
| <code>[[dice]]</code>
| <code>[[dice]]</code>
| int
| 10
| 10
| 骰子表达式最大的项数。
| 骰子表达式最大的项数。
|-
|-
| wordle_disable_image
| {{Instructor param|wordle_disable_image|bool}}
| <code>[[wordle]]</code>
| <code>[[wordle]]</code>
| bool
| false
| false
| 设置是否禁用图片版本游戏板。
| 设置是否禁用图片版本游戏板。
|}
|}
{{Navbox dev}}


[[Category:小可]]
[[Category:小可]]
[[Category:开发]]

2024年9月19日 (四) 06:46的最新版本

机器人的配置文件(config.toml)储存在 ./config/ 目录下。可使用 ~config 命令修改配置文件。

配置文件支持热更新,即在修改配置文件后立即生效,但部分配置项仍需重载模块或重启后生效。

如果你不需要某些属性,请将对应的键直接删除,请勿在文件中留空

刚开始使用的机器人拥有以下默认配置:

[secret]
db_path = "mysql+pymysql://"
check_access_key_id =
check_access_key_secret =
web_render =
proxy =
discord_token =
telegram_token =
kook_token =
matrix_device_id =
matrix_token =
matrix_megolm_backup_passphrase =
curseforge_api_key =
diving_fish_developer_token =
exchange_rate_api_key =
openai_api_key =
osu_api_key =
wolfram_alpha_appid =
jwt_secret =

[cfg]
api_port = 5000
base_superuser = ["QQ|2596322644",]
debug = false
cache_path = "./cache/"
command_prefix = ["~", "~",]
confirm_command = ["是", "对", "對", "yes", "Yes", "YES", "y", "Y",]
disabled_bots = ["",]
report_targets = ["",]
locale = "zh_cn"
timezone_offset = "+8"
bug_report_url = "https://s.wd-ljt.com/botreportbug"
donate_url = "https://afdian.com/a/teahouse"
help_url = "https://bot.teahouse.team"
help_page_url = "https://bot.teahouse.team/wiki/${module}"
issue_url = "https://github.com/Teahouse-Studios/akari-bot/issues/new/choose"
locale_url = "https://www.crowdin.com/project/akari-bot"
wiki_whitelist_url = "https://s.wd-ljt.com/botwhitelist"
web_render_local =
qq_account = 2314163511
qq_host = "127.0.0.1:11451"
qq_frame_type = "go-cqhttp"
qq_disable_temp_session = false
qq_allow_approve_friend = true
qq_allow_approve_group_invite = true
qq_enable_listening_self_message = false
qq_limited_emoji = 10060
qq_typing_emoji = 181
matrix_device_name =
matrix_homeserver =
matrix_user = "@akaribot:matrix.org"
allow_request_private_ip = false
allow_reload_base = false
no_confirm = false
slower_schedule = false
enable_commit_url = true
enable_dirty_check = true
enable_rickroll = true
enable_shuffle_joke =
shuffle_rate = 0.1
rickroll_msg = "https://wdf.ink/6OUp"
enable_urlmanager = true
enable_tos = false
tos_warning_counts = 5
tos_temp_ban_time = 300
enable_analytics = true
enable_eval = true
enable_petal = true
enable_get_petal = true
gained_petal_limit = 10
lost_petal_limit = 5
coin_limit = 10000
coin_faceup_rate = 4997
coin_facedown_rate = 4997
dice_limit = 100
dice_roll_limit = 10
dice_output_count = 50
dice_output_len = 200
dice_detail_count = 5
dice_count_limit = 10
wordle_disable_image = false

属性

secret

在表 secret 储存的内容为私有内容,当机器人发送的消息中存在这些内容时会被自动拦截。

属性 使用模块 默认值 描述
字符串 db_path "mysql+pymysql://" 数据库连接串,用于存储用户数据。
字符串 check_access_key_id 调用阿里云内容安全服务 API 时需要的 AccessKey ID。
字符串 check_access_key_secret 调用阿里云内容安全服务 API 时需要的 AccessKey Secret。
字符串 web_render Webrender 的地址(IP 或域名)及端口。
字符串 proxy 代理服务的地址(IP 或域名)及端口。
字符串 discord_token Discord 机器人令牌。
字符串 kook_token KOOK 机器人令牌。
字符串 telegram_token Telegram 机器人令牌。
字符串 matrix_device_id Matrix 机器人设备 ID。
字符串 matrix_token Matrix 机器人令牌。
字符串 matrix_megolm_backup_passphrase Matrix 机器人的 Megolm 备份密码短语。
字符串 curseforge_api_key mod_dl Curseforge API 密钥。
字符串 diving_fish_developer_token maimai
maimai_regex
Diving-Fish 查分器开发者令牌。
字符串 exchange_rate_api_key exchange_rate
petal
ExchangeRate-API 密钥。
字符串 openai_api_key ask
summary
OpenAI API 密钥。
字符串 osu_api_key osu Osu! API 密钥。
字符串 wolfram_alpha_appid ask
wolframalpha
WolframAlpha API 的 App ID。
字符串 jwt_secret

config

属性 使用模块 默认值 描述
整数 api_port 5000 机器人 API 端口。
列表 字符串 base_superuser ["QQ|2596322644",] 机器人主超级用户,输入用户对应的 ID。可使用 ~whoami 命令查看自己的 ID。
布尔值 debug false 设置是否启用 Logger 的除错模式。
字符串 cache_path "./cache/" 图片等的缓存路径。
列表 command_prefix ["~", "~",] 默认命令前缀列表。
列表 confirm_command ["是", "对", "對", "yes", "Yes", "YES", "y", "Y",] 命令确认词列表。
列表 disabled_bots ["",] 机器人禁用的平台列表,平台名称为 ./bots/ 目录下对应的文件名。
列表 report_targets ["",] 机器人发送事件回报的对话列表。
字符串 locale "zh_cn" 机器人默认使用的语言。
字符串 timezone_offset "+8" 机器人默认时区偏移量。
字符串 bug_report_url "https://s.wd-ljt.com/botreportbug" 汇报错误的网址。
字符串 donate_url help "https://afdian.com/a/teahouse" 赞助的网址。
字符串 help_url help "https://bot.teahouse.team" 帮助文档的网址。
字符串 help_page_url help "https://bot.teahouse.team/wiki/${module}" 具体模块的帮助文档网址,${module} 会被替换为模块名称。留空则将 help_url 之后加入模块名称。
字符串 issue_url "https://github.com/Teahouse-Studios/akari-bot/issues/new/choose" 提交问题(如封禁申诉等)的网址。
字符串 locale_url locale "https://www.crowdin.com/project/akari-bot" 提供多语言贡献的网址。
字符串 wiki_whitelist_url wiki "https://s.wd-ljt.com/botwhitelist" 申请 Wiki 白名单的网址。
字符串 web_render_local 本地 Webrender 的地址,若与 web_render 相同则留空。
整数 字符串 qq_account 2314163511 机器人的 QQ 号。
字符串 qq_host "127.0.0.1:11451" 用于 go-cqhttp 反向连接的 IP 地址及端口。
字符串 qq_frame_type "go-cqhttp" 告诉机器人目前正在使用的 QQ 框架。
布尔值 qq_disable_temp_session false 设置是否禁用机器人在 QQ 的临时会话。
布尔值 qq_allow_approve_friend true 设置是否在 QQ 上自动同意普通用户加好友申请。
布尔值 qq_allow_approve_group_invite true 设置是否在 QQ 上自动同意普通用户加群申请。
整数 字符串 qq_limited_emoji false QQ 被限制发送消息时回应的表情 ID
整数 字符串 qq_typing_emoji false QQ 正在发送消息时回应的表情 ID
布尔值 qq_enable_listening_self_message false 设置是否启用 QQ 的自我消息处理。
字符串 matrix_device_name Matrix 机器人设备名称。
字符串 matrix_homeserver Matrix 服务器 URL。
字符串 matrix_user "@akaribot:matrix.org" Matrix 机器人用户 ID(含@:)。
布尔值 allow_request_private_ip false 设置是否允许私有 IP 请求网站。
布尔值 allow_reload_base module false 设置是否允许重新加载基础模块。
布尔值 no_confirm false 设置是否跳过确认消息直接执行命令。
布尔值 slower_schedule false 设置是否让计划任务模块使用更长的时间间隔执行。
布尔值 enable_commit_url true 设置是否显示版本 Commit URL。
布尔值 enable_dirty_check true 设置是否启用屏蔽词检查。
布尔值 enable_rickroll true 设置请求被拦截时是否输出内容。
布尔值 enable_shuffle_joke 设置是否启用内置愚人节玩笑。若留空则会在 4 月 1 日启用愚人节玩笑。
浮点数 整数 shuffle_rate 0.1 设置愚人节玩笑的文字打乱频率,输入为 0-1 之间。
布尔值 rickroll_msg "https://wdf.ink/6OUp" 请求被拦截时输出的内容。
布尔值 enable_urlmanager wiki
wiki_audit
true 设置是否启用 URL 管理,禁用后无法使用 wiki_audit 命令。
布尔值 enable_tos false 设置是否启用内置的违反服务条款检查。
整数 tos_waring_counts 5 设置用户违反服务条款的最高警告次数。
整数 tos_temp_ban_time 300 设置用户违反服务条款后的临时限制时间。
布尔值 enable_analytics analytics true 设置是否启用 analytics 模块相关命令。
布尔值 enable_eval eval true 设置是否启用 eval 模块相关命令。
布尔值 enable_petal petal true 设置是否启用花瓣。
布尔值 enable_get_petal petal true 设置是否启用获取花瓣途径。
整数 gained_petal_limit petal 10 设置一天内获得的花瓣数量限制。
整数 lost_petal_limit petal 5 设置一天内失去的花瓣数量限制。
整数 coin_limit coin 10000 一次可投掷的硬币最大个数。
整数 coin_faceup_rate coin 4994 硬币正面朝上的概率,按一万分之几计算。
整数 coin_facedown_rate coin 4994 硬币反面朝上的概率,按一万分之几计算。
整数 dice_limit dice 100 一次可投掷的骰子最大个数。
整数 dice_roll_limit dice 10 投掷骰子的最大次数。
整数 dice_output_count dice 50 输出时的最大数据量,超过则无法正常显示。
整数 dice_output_len dice 200 输出时的最大长度,超过则无法正常显示。
整数 dice_detail_count dice 5 多次投掷骰子的总数,超过则不再显示详细信息。
整数 dice_count_limit dice 10 骰子表达式最大的项数。
布尔值 wordle_disable_image wordle false 设置是否禁用图片版本游戏板。
Cookie帮助我们提供我们的服务。通过使用我们的服务,您同意我们使用cookie。