@alemonjs/qq-bot 2.1.0-alpha.2 → 2.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,63 +0,0 @@
1
- type MessageType = 0 | 1 | 2 | 3 | 4 | 7
2
- type FileType = 1 | 2 | 3 | 4
3
- interface ButtonType {
4
- id: string
5
- render_data: {
6
- label: string
7
- visited_label: string
8
- style?: number
9
- }
10
- action: {
11
- type: number
12
- permission: {
13
- type: number
14
- }
15
- reply?: boolean
16
- enter?: boolean
17
- unsupport_tips?: string
18
- data:
19
- | string
20
- | {
21
- click: string
22
- confirm: string
23
- cancel: string
24
- }
25
- at_bot_show_channel_list?: boolean
26
- }
27
- }
28
- interface KeyboardType {
29
- id?: string
30
- content?: {
31
- rows: {
32
- buttons: ButtonType[]
33
- }[]
34
- }
35
- }
36
- interface MarkdownType {
37
- /** markdown 模版id,申请模版后获得 */
38
- custom_template_id: string
39
- /** 原生 markdown 文本内容(内邀使用) */
40
- content?: string
41
- /** 模版内变量与填充值的kv映射 */
42
- params?: Array<{
43
- key: string
44
- values: string[]
45
- }>
46
- }
47
- interface ApiRequestData {
48
- content?: string
49
- msg_type: MessageType
50
- markdown?: MarkdownType
51
- keyboard?: KeyboardType
52
- media?: {
53
- file_info: string
54
- }
55
- ark?: any
56
- image?: any
57
- message_reference?: any
58
- event_id?: any
59
- msg_id?: string
60
- msg_seq?: number
61
- }
62
-
63
- export type { ApiRequestData, ButtonType, FileType, KeyboardType, MarkdownType, MessageType }
package/lib/utils.js DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- *
3
- * @param str
4
- * @returns
5
- */
6
- const isGuild = str => {
7
- // guild ID 纯数字,例如:11586990140073229091
8
- // 转换失败,是群id。return false
9
- if (isNaN(Number(str.substring(0, 6)))) return false
10
- return true
11
- }
12
-
13
- export { isGuild }