-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.js
More file actions
32 lines (27 loc) · 855 Bytes
/
Copy pathexample.js
File metadata and controls
32 lines (27 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Copyright (C) 2025-2026 Ginko
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/
*
* This code is part of Ginko project (https://github.com/ginkohub)
*/
import pino from "pino";
import { ClientEvents, Method } from "./src/client.js";
import { logger, manager } from "./src/index.js";
const mainBot = await manager.addBot({
name: "example",
method: process.env.METHOD || Method.QRCode,
phone: process.env.PHONE || "",
socketConfig: {
browser: process.env.BROWSER || "Safari",
logger: pino({ level: "fatal" }),
syncFullHistory: false,
},
prefixes: [".", "/"],
});
mainBot.on(ClientEvents.CONNECTED, async () => {
logger.info("Connected");
});
mainBot.connect();