Skip to content

Commit 620fbb1

Browse files
🔄 Sync from private repository - 2026-02-04 14:26:30
1 parent 5548703 commit 620fbb1

File tree

3 files changed

+2
-33
lines changed

3 files changed

+2
-33
lines changed

TrollScript-Private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit ef4c41193458c61c94e229846c8507364279b489
1+
Subproject commit 0aa502357134ffe7bd015518b23d2137cfbb9ff6

npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dompling/trollscript-types",
3-
"version": "1.0.50",
3+
"version": "1.0.51",
44
"description": "TypeScript definitions for TrollScript",
55
"main": "",
66
"types": "index.d.ts",

templates/API/SMS.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ const messages = sms.read(20);
1616
messages.forEach(msg => {
1717
console.log(`${msg.address}: ${msg.text}`);
1818
});
19-
20-
// 提取验证码
21-
const code = sms.getVerificationCode();
22-
if (code) {
23-
console.log('验证码:', code);
24-
clipboard.setText(code);
25-
}
2619
```
2720

2821
---
@@ -106,30 +99,6 @@ console.log(`与 10086 的短信记录: ${messages.length} 条`);
10699

107100
---
108101

109-
### 验证码提取
110-
111-
#### `sms.getVerificationCode(seconds?)`
112-
从最近的短信中提取验证码。**参数:** `seconds` (number, 可选,默认 60) **返回:** `string | null`
113-
114-
自动识别常见的验证码格式(4-8 位数字)。
115-
116-
```javascript
117-
// 提取最近 60 秒内的验证码
118-
const code = sms.getVerificationCode();
119-
if (code) {
120-
console.log('验证码:', code);
121-
clipboard.setText(code);
122-
notification.send('验证码', code);
123-
} else {
124-
console.log('未找到验证码');
125-
}
126-
127-
// 提取最近 2 分钟内的验证码
128-
const code2 = sms.getVerificationCode(120);
129-
```
130-
131-
---
132-
133102
### 聊天管理
134103

135104
#### `sms.getChats()`

0 commit comments

Comments
 (0)