feat: pk;config

This commit is contained in:
spiral
2021-11-29 21:35:21 -05:00
parent d195c80d92
commit 56d07e0f2d
41 changed files with 648 additions and 313 deletions

View File

@@ -37,6 +37,7 @@ PluralKit will send invalid requests to your endpoint, with `PING` event type, o
|---|---|---|---|
|PING|PluralKit is checking if your webhook URL is working.|null|Reply with a 200 status code if the `signing_token` is correct, or a 401 status code if it is invalid.|
|UPDATE_SYSTEM|your system was updated|[system object](/api/models#system-model) only containing modififed keys|
|UPDATE_SETTINGS|your bot settings were updated|[system settings object](/api/models#system-settings-model) only containing modified keys|
|CREATE_MEMBER|a new member was created|[member object](/api/models#member-model) only containing `name` key|new member ID can be found in the top-level `id` key`|
|UPDATE_MEMBER|a member was updated|[member object](/api/models#member-model) only containing modified keys|member ID can be found in the top-level `id` key`|
|DELETE_MEMBER|a member was deleted|null|old member ID can be found in the top-level `id` key`|

View File

@@ -28,6 +28,20 @@ Takes a partial [system object](/api/models#system-model).
Returns a [system object](/api/models#system-model).
### Get System Settings
GET `/systems/{systemRef}/settings`
Returns a [system settings object](/api/models#system-settings-model).
### Update System Settings
PATCH `/systems/{systemRef}/settings`
Takes a partial [system settings object](/api/models#system-settings-model).
Returns a [system settings object](/api/models#system-settings-model).
### Get System Guild Settings
GET `/systems/@me/guilds/{guild_id}`

View File

@@ -28,7 +28,6 @@ Every PluralKit entity has two IDs: a short (5-character) ID and a longer UUID.
|banner|?string|256-character limit, must be a publicly-accessible URL|
|color|string|6-character hex code, no `#` at the beginning|
|created|datetime||
|timezone|string|defaults to `UTC`|
|privacy|?system privacy object||
* System privacy keys: `description_privacy`, `member_list_privacy`, `group_list_privacy`, `front_privacy`, `front_history_privacy`
@@ -100,6 +99,16 @@ Every PluralKit entity has two IDs: a short (5-character) ID and a longer UUID.
|system|full System object|The system that proxied the message.|
|member|full Member object|The member that proxied the message.|
### System settings model
|key|type|notes|
|---|---|---|
|timezone|string|defaults to `UTC`|
|pings_enabled|boolean|
|latch_timeout|int?|
|member_limit|int|read-only, defaults to 1000|
|group_limit|int|read-only, defaults to 250|
### System guild settings model
|key|type|notes|

View File

@@ -43,7 +43,6 @@ Some arguments indicate the use of specific Discord features. These include:
- `pk;system privacy <subject> <public|private>` - Changes your systems privacy settings.
- `pk;system tag [tag]` - Changes the system tag of your system.
- `pk;system servertag [tag|-enable|-disable]` - Changes your system's tag in the current server, or disables it for the current server.
- `pk;system timezone [location]` - Changes the time zone of your system.
- `pk;system proxy [server id] [on|off]` - Toggles message proxying for a specific server.
- `pk;system delete` - Deletes your system.
- `pk;system [system] fronter` - Shows the current fronter of a system.
@@ -107,8 +106,12 @@ Some arguments indicate the use of specific Discord features. These include:
## Autoproxy commands
- `pk;autoproxy [off|front|latch|<member>]` - Sets your system's autoproxy mode for the current server.
- `pk;autoproxy timeout [<duration>|off|reset]` - Sets the latch timeout duration for your system.
- `pk;autoproxy account [on|off]` - Toggles autoproxy globally for the current account.
## Config commands
- `pk;config timezone [location]` - Changes the time zone of your system.
- `pk;config ping <enable|disable>` - Changes your system's ping preferences.
- `pk;config autoproxy timeout [<duration>|off|reset]` - Sets the latch timeout duration for your system.
- `pk;config autoproxy account [on|off]` - Toggles autoproxy globally for the current account.
## Server owner commands
*(all commands here require Manage Server permission)*