Skip to content

Commit f7c679f

Browse files
committed
docs: add favicon assets, update quickstart example
1 parent 6f28d1d commit f7c679f

8 files changed

Lines changed: 37 additions & 10 deletions

File tree

31.1 KB
Loading
9.97 KB
Loading

docs/public/favicon/favicon.ico

14.7 KB
Binary file not shown.

docs/public/favicon/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "Zaileys Library",
3+
"short_name": "Zaileys",
4+
"icons": [
5+
{
6+
"src": "/web-app-manifest-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png",
9+
"purpose": "maskable"
10+
},
11+
{
12+
"src": "/web-app-manifest-512x512.png",
13+
"sizes": "512x512",
14+
"type": "image/png",
15+
"purpose": "maskable"
16+
}
17+
],
18+
"theme_color": "#ffffff",
19+
"background_color": "#ffffff",
20+
"display": "standalone"
21+
}
35.3 KB
Loading
209 KB
Loading

examples/quickstart-connect.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
*
44
* Run: bun run examples/quickstart-connect.ts
55
*/
6-
import { Client } from '../src/index.js'
6+
import { Client } from "../src/index.js";
77

8-
const client = new Client()
8+
const client = new Client();
99

10-
client.on('qr', ({ qrString }) => console.log('Scan QR:', qrString))
11-
client.on('connect', ({ me }) => console.log('Connected as', me.id))
10+
client.on("qr", ({ qrString }) => console.log("Scan QR:", qrString));
11+
client.on("connect", ({ me }) => console.log("Connected as", me.id));
1212

13-
client.on('text', async (msg) => {
14-
console.log('Received:', msg.senderId, '|', msg.text)
13+
client.on("message", async (msg) => {
14+
const roomName = await msg.roomName();
15+
console.log("Received text:", msg);
16+
console.log("Main Room Name", roomName);
1517

16-
const quoted = await msg.replied()
17-
if (quoted) console.log('In reply to:', quoted.senderId, '|', quoted.text)
18+
const quoted = await msg.replied();
1819

19-
await client.send(msg.senderId).text(`Halo ${msg.senderName ?? ''}! You said: ${msg.text}`)
20-
})
20+
if (quoted) {
21+
const quotedRoomName = await quoted.roomName();
22+
console.log("Quoted Room Name", quotedRoomName);
23+
console.log("In reply to:", quoted);
24+
}
25+
});

0 commit comments

Comments
 (0)