File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed
Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 1+ import { Client } from "./mod.ts" ;
2+
3+ const client = new Client ( {
4+ nick : "totoche" ,
5+ verbose : ( log ) => {
6+ if ( log . type === "event" ) {
7+ if ( log . event === "join" ) {
8+ log . payload ;
9+ } else if ( log . event === "fdfdfs" ) {
10+ log . payload ;
11+ }
12+ }
13+ } ,
14+ } ) ;
15+
16+ client . connect ( "irc.libera.chat" ) ;
17+
18+ client . on ( "" )
Original file line number Diff line number Diff line change 1- import { CoreClient } from "../core/client.ts" ;
1+ // deno-lint-ignore-file no-explicit-any
22import { type ClientError } from "../core/errors.ts" ;
33import { createPlugin } from "../core/plugins.ts" ;
44import { type AnyRawCommand } from "../core/protocol.ts" ;
@@ -12,7 +12,7 @@ interface RawLogPayload {
1212interface EventLogPayload {
1313 type : "event" ;
1414 event : string ;
15- payload : unknown ;
15+ payload : any ;
1616}
1717
1818interface CommandLogPayload {
@@ -23,9 +23,9 @@ interface CommandLogPayload {
2323
2424interface StateLogPayload {
2525 type : "state" ;
26- state : CoreClient [ "state" ] ;
27- key : keyof CoreClient [ "state" ] ;
28- value : unknown ;
26+ state : any ;
27+ key : string ;
28+ value : any ;
2929}
3030
3131type LogPayload =
@@ -127,7 +127,6 @@ export default createPlugin(
127127 const loggerImpl = getLoggerImpl ( ) ;
128128 if ( ! loggerImpl ) return ;
129129
130- // deno-lint-ignore no-explicit-any
131130 client . hooks . afterCall ( "read" as any , ( chunks : string | null ) => {
132131 loggerImpl ( { type : "raw_input" , msg : chunks } ) ;
133132 } ) ;
You can’t perform that action at this time.
0 commit comments