mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Added ability to log messages
This commit is contained in:
@@ -20,10 +20,10 @@ export async function sendAndRetreiveMessage(conn: WAConnection, content, type:
|
||||
export const WAConnectionTest = (name: string, func: (conn: WAConnection) => void) => (
|
||||
describe(name, () => {
|
||||
const conn = new WAConnection()
|
||||
conn.logLevel = MessageLogLevel.info
|
||||
conn.connectOptions.maxIdleTimeMs = 30_000
|
||||
conn.logLevel = MessageLogLevel.unhandled
|
||||
|
||||
before(async () => {
|
||||
//conn.logLevel = MessageLogLevel.unhandled
|
||||
const file = './auth_info.json'
|
||||
await conn.loadAuthInfo(file).connect()
|
||||
await fs.writeFile(file, JSON.stringify(conn.base64EncodedAuthInfo(), null, '\t'))
|
||||
|
||||
Reference in New Issue
Block a user