@itsliaaa/starcore 0.0.0-alpha.14 → 0.0.0-alpha.16.463433

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.
package/README.md CHANGED
@@ -159,6 +159,18 @@ const client = new Client({
159
159
  }
160
160
  })
161
161
 
162
+ client.on('connect', (ctx) => {
163
+ switch (ctx.type) {
164
+ case 'pairing':
165
+ console.log(ctx.prettyCode ?? ctx.asciiQr)
166
+ break
167
+
168
+ case 'close':
169
+ console.error(ctx.reason)
170
+ break
171
+ }
172
+ })
173
+
162
174
  client.on('message', (ctx) => {
163
175
  if (ctx.body === 'hello') {
164
176
  ctx.m.reply('👋 Hello there!')
@@ -267,6 +279,8 @@ setInterval(async () => {
267
279
  ### 📡 Events Reference
268
280
 
269
281
  ```javascript
282
+ client.on('prepare', console.log)
283
+ client.on('connect', console.log)
270
284
  client.on('ready', console.log)
271
285
  client.on('message', console.log)
272
286
  client.on('message.edit', console.log)