浏览代码

adding converters for the back end so that the front end knows what to convert id's and such too for better display.

tags/v1.7.0
Roxie Gibson 6 年前
父节点
当前提交
47e3cd6204
共有 1 个文件被更改,包括 14 次插入5 次删除
  1. +14
    -5
      roxbot/guild_settings.py

+ 14
- 5
roxbot/guild_settings.py 查看文件

@@ -1,9 +1,12 @@
import json
# TODO: Make the convert stuff seperate but cant do that now cause it would require how you interact with the guild settings api.
# Cause a settings dict would be split into two more instead of just the settings.

guild_template = {
"example": {
"greets": {
"enabled": 0,
"convert": {"enabled": "bool", "welcome-channel": "channel"},
"welcome-channel": "",
"member-role": "",
"custom-message": "",
@@ -11,26 +14,30 @@ guild_template = {
},
"goodbyes": {
"enabled": 0,
"convert": {"enabled": "bool", "goodbye-channel": "channel"},
"goodbye-channel": "",
},
"self_assign": {
"enabled": 0,
"convert": {"enabled": "bool", "roles": "role"},
"roles": []
},
"twitch": {
"enabled": 0,
"convert": {"enabled": "bool", "channel": "channel", "whitelist_enabled": "bool", "whitelist": "user"},
"channel": "",
"whitelist": {
"enabled": 0,
"list": []
"whitelist_enabled": 0,
"whitelist": []
}
},
"nsfw": {
"enabled": 0,
"channels": [],
"convert": {"enabled": "bool", "channels": "channel"},
"blacklist": []
},
"perm_roles": {
"convert": {"admin": "role", "mod": "role"},
"admin": [],
"mod": []
},
@@ -47,16 +54,18 @@ guild_template = {
"is_anal": {"y/n": 0},
"logging": {
"enabled": 0,
"convert": {"enabled": "bool", "channel": "channel"},
"channel": 0
},
"voice": {
"need_perms": 0,
"skip_voting": 0,
"skip_ratio": 0.6,
"convert": {"need_perms": "bool", "skip_voting": "bool"},
"max_length": 600
}
}
}
}


def _open_config():

正在加载...
取消
保存