Skip to content

Commit 808988e

Browse files
committed
add translations
1 parent cc85116 commit 808988e

File tree

6 files changed

+165
-50
lines changed

6 files changed

+165
-50
lines changed

.vitepress/theme/index.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,28 @@ blockquote.route {
2121
.vp-doc sup a {
2222
text-decoration: none;
2323
}
24+
25+
.adapter-table {
26+
display: grid;
27+
grid-template-columns: repeat(3, 1fr);
28+
grid-gap: 1rem 1rem;
29+
30+
a.adapter {
31+
display: flex;
32+
align-items: center;
33+
justify-content: center;
34+
width: 100%;
35+
height: 4rem;
36+
border-radius: 12px;
37+
background-color: var(--vp-c-bg-soft);
38+
transition: all 0.3s ease;
39+
text-decoration: none;
40+
color: var(--vp-c-text);
41+
cursor: pointer;
42+
user-select: none;
43+
}
44+
45+
.adapter:hover {
46+
background-color: var(--vp-c-bg-alt);
47+
}
48+
}

en-US/introduction.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
# Introduction
2+
3+
Satori is a universal chat protocol. We aim for Satori to bridge the differences between various chat platforms, enabling developers to create cross-platform, scalable, and high-performance chat applications at a lower cost.
4+
5+
The name "Satori" is inspired by the character Komeiji Satori from the game Touhou Project. Komeiji Satori can communicate with various animals through telepathy, and this name was chosen in the hope that Satori can serve as a bridge between different chat platforms.
6+
7+
The Satori development team has long been engaged in chatbot development and is familiar with the communication methods of various chat platforms. After four years of development, Satori has a robust design and mature implementation. Currently, Satori officially provides adapters for over 15 chat platforms, fully covering the world's mainstream chat platforms:
8+
9+
<div class="adapter-table">
10+
<a class="adapter">DingTalk</a>
11+
<a class="adapter">Discord</a>
12+
<a class="adapter">KOOK</a>
13+
<a class="adapter">Lark</a>
14+
<a class="adapter">LINE</a>
15+
<a class="adapter">Email</a>
16+
<a class="adapter">Matrix</a>
17+
<a class="adapter">QQ</a>
18+
<a class="adapter">Slack</a>
19+
<a class="adapter">Telegram</a>
20+
<a class="adapter">WeChat Official Account</a>
21+
<a class="adapter">WeCom</a>
22+
<a class="adapter">HoYoLAB</a>
23+
<a class="adapter">WhatsApp</a>
24+
<a class="adapter">Zulip</a>
25+
</div>
26+
27+
These adapters not only provide an out-of-the-box experience but also practically demonstrate the universality and extensibility of the Satori protocol.
28+
29+
You don’t need to worry about losing control over chat platforms when using Satori. Thanks to Satori’s internal interface mechanism, you can write generic code in most cases and use internal interfaces to implement platform-specific features when needed.
30+
31+
Additionally, Satori offers a complete solution for large-scale scenarios. Whether it’s a chatbot on a personal computer or a chat platform backend on a distributed cluster, Satori can meet your needs.

en-US/resources/channel.md

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,97 @@
22

33
## Definition
44

5-
### Channel
5+
### Channel {#def-channel}
66

77
| FIELD | TYPE | DESCRIPTION |
88
| ----- | ---- | ----------- |
99
| id | string | channel ID |
10-
| name | string | channel name |
10+
| type | [ChannelType](#channeltype) | channel type |
11+
| name | string? | channel name |
12+
| parent_id | string? | parent channel ID |
13+
14+
### ChannelType
15+
16+
| 名称 || 描述 |
17+
| --- | --- | --- |
18+
| TEXT | 0 | text channel |
19+
| DIRECT | 1 | direct message channel |
20+
| CATEGORY | 2 | category channel |
21+
| VOICE | 3 | voice channel |
1122

1223
## API
1324

14-
### Get Channel
25+
### Get Guild Channel {#api-channel-get}
1526

16-
- <badge>POST</badge> `/v1/channel.get`
27+
> <badge>POST</badge> `/channel.get` {.route}
1728
1829
| FIELD | TYPE | DESCRIPTION |
1930
| ----- | ---- | ----------- |
2031
| channel_id | string | channel ID |
2132

22-
Get a channel by ID. Returns a [channel](#channel-1) object.
33+
Get a channel by ID. Returns a [Channel](#def-channel) object.
2334

24-
### bot.getChannelList(guildId, next?)
35+
### Get Guild Channel List {#api-channel-list}
2536

26-
- <badge>POST</badge> `/v1/channel.list`
37+
> <badge>POST</badge> `/channel.list` {.route}
2738
2839
| FIELD | TYPE | DESCRIPTION |
2940
| ----- | ---- | ----------- |
3041
| guild_id | string | guild ID |
3142
| next | string | pagination token |
3243

33-
Get channels in a guild. Returns a [list](../protocol/api.md#pagination) of [channel](#channel-1) objects.
44+
Get all channels in a guild. Returns a [List](../protocol/api.md#list) of [Channel](#def-channel) objects.
45+
46+
### Create Guild Channel {#api-channel-create}
47+
48+
> <badge>POST</badge> `/channel.create` {.route}
49+
50+
| FIELD | TYPE | DESCRIPTION |
51+
| --- | --- | --- |
52+
| guild_id | string | guild ID |
53+
| data | [Channel](#def-channel) | channel data |
54+
55+
Create a guild channel. Returns a [Channel](#def-channel) object.
56+
57+
### Update Guild Channel {#api-channel-update}
58+
59+
> <badge>POST</badge> `/channel.update` {.route}
60+
61+
| FIELD | TYPE | DESCRIPTION |
62+
| --- | --- | --- |
63+
| channel_id | string | channel ID |
64+
| data | [Channel](#def-channel) | channel data |
65+
66+
Update a guild channel.
67+
68+
### Delete Guild Channel {#api-channel-delete}
69+
70+
> <badge>POST</badge> `/channel.delete` {.route}
71+
72+
| FIELD | TYPE | DESCRIPTION |
73+
| --- | --- | --- |
74+
| channel_id | string | channel ID |
75+
76+
Delete a guild channel.
77+
78+
### Mute Guild Channel <badge type="warning">Experimental</badge> {#api-channel-mute}
79+
80+
> <badge>POST</badge> `/channel.mute` {.route}
81+
82+
| FIELD | TYPE | DESCRIPTION |
83+
| --- | --- | --- |
84+
| channel_id | string | channel ID |
85+
| duration | number | mute duration (in milliseconds) |
86+
87+
Mute a guild channel. If the duration is set to 0, it will unmute the channel.
88+
89+
### Create Direct Message Channel {#api-user-channel-create}
90+
91+
> <badge>POST</badge> `/user.channel.create` {.route}
92+
93+
| FIELD | TYPE | DESCRIPTION |
94+
| --- | --- | --- |
95+
| user_id | string | user ID |
96+
| guild_id | string? | guild ID |
97+
98+
Create a direct message channel. Returns a [Channel](#def-channel) object.

en-US/resources/guild.md

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,62 @@
22

33
## Definition
44

5-
### Guild
5+
### Guild {#def-guild}
66

77
| FIELD | TYPE | DESCRIPTION |
88
| ----- | ---- | ----------- |
99
| id | string | guild ID |
10-
| name | string | guild name |
10+
| name | string? | guild name |
11+
| avatar | string? | guild avatar |
1112

1213
## API
1314

14-
### bot.getGuild(guildId)
15+
### Get Guild {#api-guild-get}
1516

16-
- <badge>POST</badge> `/v1/guild.get`
17+
> <badge>POST</badge> `/guild.get` {.route}
1718
1819
| FIELD | TYPE | DESCRIPTION |
1920
| ----- | ---- | ----------- |
2021
| guild_id | string | guild ID |
2122

22-
Get a guild by ID. Returns a [guild](#guild-1) object.
23+
Get a guild by ID. Returns a [Guild](#def-guild) object.
2324

24-
### bot.getGuildList(next?)
25+
### Get Guild List {#api-guild-list}
2526

26-
- <badge>POST</badge> `/v1/guild.list`
27+
> <badge>POST</badge> `/guild.list` {.route}
2728
2829
| FIELD | TYPE | DESCRIPTION |
2930
| ----- | ---- | ----------- |
3031
| next | string | pagination token |
3132

32-
Get guilds where the current user is a member. Returns a [list](../protocol/api.md#pagination) of partial [guild](#guild-1) objects.
33+
Get guilds where the current user is a member. Returns a [List](../protocol/api.md#list) of partial [Guild](#def-guild) objects.
3334

34-
### bot.handleGuildRequest(messageId, approve, comment?)
35+
### Handle Guild Invitation {#api-guild-approve}
3536

36-
- **messageId:** `string` 请求 ID
37-
- **approve:** `boolean` 是否通过请求
38-
- **comment:** `string` 备注信息
39-
- 返回值: `Promise<void>`
37+
> <badge>POST</badge> `/guild.approve` {.route}
4038
41-
处理来自群组的邀请。
39+
| FIELD | TYPE | DESCRIPTION |
40+
| --- | --- | --- |
41+
| message_id | string | request ID |
42+
| approve | boolean | whether to approve the request |
43+
| comment | string? | comment |
44+
45+
Handle an invitation from a guild.
46+
47+
## Events
48+
49+
### guild-added
50+
51+
Triggered when joining a guild. Required resource: `guild`.
52+
53+
### guild-updated
54+
55+
Triggered when a guild is modified. Required resource: `guild`.
56+
57+
### guild-removed
58+
59+
Triggered when leaving a guild. Required resource: `guild`.
60+
61+
### guild-request
62+
63+
Triggered when receiving a new guild invitation. Required resource: `guild`.

zh-CN/introduction.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,6 @@ Satori 的开发团队长期从事聊天机器人开发,熟悉各种聊天平
2424
<a class="adapter">Zulip</a>
2525
</div>
2626

27-
<style lang="scss">
28-
.adapter-table {
29-
display: grid;
30-
grid-template-columns: repeat(3, 1fr);
31-
grid-gap: 1rem 1rem;
32-
33-
a.adapter {
34-
display: flex;
35-
align-items: center;
36-
justify-content: center;
37-
width: 100%;
38-
height: 4rem;
39-
border-radius: 12px;
40-
background-color: var(--vp-c-bg-soft);
41-
transition: all 0.3s ease;
42-
text-decoration: none;
43-
color: var(--vp-c-text);
44-
cursor: pointer;
45-
user-select: none;
46-
}
47-
48-
.adapter:hover {
49-
background-color: var(--vp-c-bg-alt);
50-
}
51-
}
52-
</style>
53-
5427
这些适配器不仅为你带来了开箱即用的体验,也从实际上证明了 Satori 协议的通用性和扩展性。
5528

5629
不必担心使用 Satori 后会失去对聊天平台的控制。得益于 Satori 的内部接口机制,你完全可以大多数情况下编写通用代码,并在需要的时候使用内部接口来实现平台特定功能。

zh-CN/resources/guild.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
| --- | --- | --- |
4141
| message_id | string | 请求 ID |
4242
| approve | boolean | 是否通过请求 |
43-
| comment | string | 备注信息 |
43+
| comment | string? | 备注信息 |
4444

4545
处理来自群组的邀请。
4646

0 commit comments

Comments
 (0)