configuration.schema.json 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. {
  2. "$schema": "https://json-schema.org/draft-07/schema",
  3. "$id": "https://github.com/ReVancedTeam/revanced-signatures/blob/main/signatures.schema.json",
  4. "title": "Configuration schema",
  5. "description": "The Revanced Discord bot configuration schema.",
  6. "type": "object",
  7. "properties": {
  8. "general": {
  9. "type": "object",
  10. "properties": {
  11. "embed_color": {
  12. "$ref": "#/$defs/color"
  13. },
  14. "mute": {
  15. "type": "object",
  16. "properties": {
  17. "role": {
  18. "type": "integer",
  19. "description": "The id of the role."
  20. },
  21. "take": {
  22. "$ref": "#/$defs/roles"
  23. }
  24. }
  25. },
  26. "media_channels": {
  27. "$ref": "#/$defs/channels",
  28. "description": "A list of channel ids where only media is allowed."
  29. },
  30. "logging_channel": {
  31. "type": "integer",
  32. "description": "The id of the channel to send logs to."
  33. }
  34. }
  35. },
  36. "administrators": {
  37. "type": "object",
  38. "properties": {
  39. "roles": {
  40. "$ref": "#/$defs/roles",
  41. "description": "A list of role ids. Users with these roles have administrative privileges over this Discord bot."
  42. },
  43. "users": {
  44. "$ref": "#/$defs/users",
  45. "description": "A list of user ids. Users with these ids have administrative privileges over this Discord bot."
  46. }
  47. },
  48. "description": "The list of administrators to control the Discord bot."
  49. },
  50. "thread_introductions": {
  51. "type": "array",
  52. "items": {
  53. "type": "object",
  54. "properties": {
  55. "channels": {
  56. "$ref": "#/$defs/channels",
  57. "description": "A list of channel ids. The bot will only introduce in threads under these channels."
  58. },
  59. "response": {
  60. "$ref": "#/$defs/response",
  61. "description": "The response to send when the thread has been created."
  62. }
  63. }
  64. },
  65. "description": "Introduce new threads with a message.",
  66. "uniqueItems": true
  67. },
  68. "message_responses": {
  69. "type": "array",
  70. "items": {
  71. "type": "object",
  72. "properties": {
  73. "includes": {
  74. "type": "object",
  75. "channels": {
  76. "$ref": "#/$defs/channels",
  77. "description": "A list of channel ids. The bot will only respond to messages in these channels."
  78. },
  79. "match": {
  80. "$ref": "#/$defs/match",
  81. "description": "The message must match this regex to be responded to."
  82. }
  83. },
  84. "excludes": {
  85. "type": "object",
  86. "roles": {
  87. "$ref": "#/$defs/roles",
  88. "description": "A list of role ids. The bot will not respond to messages from users with these roles."
  89. },
  90. "match": {
  91. "$ref": "#/$defs/match",
  92. "description": "Messages matching this regex will not be responded to."
  93. }
  94. },
  95. "condition": {
  96. "type": "object",
  97. "properties": {
  98. "user": {
  99. "type": "object",
  100. "properties": {
  101. "server_age": {
  102. "type": "integer",
  103. "description": "The user must be less than this many days old on the server."
  104. }
  105. },
  106. "description": "User condition."
  107. }
  108. },
  109. "description": "The conditions to respond to the message."
  110. },
  111. "response": {
  112. "$ref": "#/$defs/response",
  113. "description": "The response to send when the message is responded to."
  114. }
  115. },
  116. "description": "The conditions to respond to a message."
  117. },
  118. "description": "A list of responses the Discord bot should send based on given conditions."
  119. }
  120. },
  121. "$defs": {
  122. "color": {
  123. "type": "integer",
  124. "description": "The color of the embed."
  125. },
  126. "users": {
  127. "$ref": "#/$defs/ids"
  128. },
  129. "roles": {
  130. "$ref": "#/$defs/ids"
  131. },
  132. "channels": {
  133. "$ref": "#/$defs/ids"
  134. },
  135. "ids": {
  136. "type": "array",
  137. "items": {
  138. "type": "integer"
  139. },
  140. "uniqueItems": true
  141. },
  142. "match": {
  143. "$ref": "#/$defs/regex",
  144. "description": "A list of regex strings."
  145. },
  146. "regex": {
  147. "type": "array",
  148. "items": {
  149. "type": "string"
  150. },
  151. "uniqueItems": true,
  152. "minItems": 1
  153. },
  154. "embed": {
  155. "type": "object",
  156. "properties": {
  157. "title": {
  158. "type": "string",
  159. "description": "The title of the embed."
  160. },
  161. "description": {
  162. "type": "string",
  163. "description": "The description of the embed."
  164. },
  165. "color": {
  166. "$ref": "#/$defs/color",
  167. "description": "The color of the embed."
  168. },
  169. "fields": {
  170. "type": "array",
  171. "items": {
  172. "type": "object",
  173. "properties": {
  174. "name": {
  175. "type": "string",
  176. "description": "The name of the field."
  177. },
  178. "value": {
  179. "type": "string",
  180. "description": "The value of the field."
  181. },
  182. "inline": {
  183. "type": "boolean",
  184. "description": "Whether the field is inline."
  185. }
  186. },
  187. "description": "The field to add to the embed."
  188. },
  189. "description": "The fields to add to the embed."
  190. },
  191. "image": {
  192. "type": "object",
  193. "properties": {
  194. "url": {
  195. "type": "string",
  196. "description": "The url of the image."
  197. }
  198. },
  199. "description": "The image to add to the embed."
  200. },
  201. "thumbnail": {
  202. "type": "object",
  203. "properties": {
  204. "url": {
  205. "type": "string",
  206. "description": "The url of the thumbnail."
  207. }
  208. },
  209. "description": "The thumbnail to add to the embed."
  210. },
  211. "author": {
  212. "type": "object",
  213. "properties": {
  214. "name": {
  215. "type": "string",
  216. "description": "The name of the author."
  217. },
  218. "url": {
  219. "type": "string",
  220. "description": "The url of the author."
  221. },
  222. "icon_url": {
  223. "type": "string",
  224. "description": "The url of the author's icon."
  225. }
  226. },
  227. "description": "The author to add to the embed."
  228. },
  229. "footer": {
  230. "type": "object",
  231. "properties": {
  232. "text": {
  233. "type": "string",
  234. "description": "The text of the footer."
  235. },
  236. "icon_url": {
  237. "type": "string",
  238. "description": "The url of the footer's icon."
  239. }
  240. },
  241. "description": "The footer to add to the embed."
  242. }
  243. }
  244. },
  245. "response": {
  246. "type": "object",
  247. "properties": {
  248. "message": {
  249. "type": "string",
  250. "description": "The message. Can be empty if the embed is not empty"
  251. },
  252. "embed": {
  253. "$ref": "#/$defs/embed",
  254. "description": "The embed to send."
  255. }
  256. }
  257. }
  258. }
  259. }