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
2
2
import { type ClientError } from "../core/errors.ts" ;
3
3
import { createPlugin } from "../core/plugins.ts" ;
4
4
import { type AnyRawCommand } from "../core/protocol.ts" ;
@@ -12,7 +12,7 @@ interface RawLogPayload {
12
12
interface EventLogPayload {
13
13
type : "event" ;
14
14
event : string ;
15
- payload : unknown ;
15
+ payload : any ;
16
16
}
17
17
18
18
interface CommandLogPayload {
@@ -23,9 +23,9 @@ interface CommandLogPayload {
23
23
24
24
interface StateLogPayload {
25
25
type : "state" ;
26
- state : CoreClient [ "state" ] ;
27
- key : keyof CoreClient [ "state" ] ;
28
- value : unknown ;
26
+ state : any ;
27
+ key : string ;
28
+ value : any ;
29
29
}
30
30
31
31
type LogPayload =
@@ -127,7 +127,6 @@ export default createPlugin(
127
127
const loggerImpl = getLoggerImpl ( ) ;
128
128
if ( ! loggerImpl ) return ;
129
129
130
- // deno-lint-ignore no-explicit-any
131
130
client . hooks . afterCall ( "read" as any , ( chunks : string | null ) => {
132
131
loggerImpl ( { type : "raw_input" , msg : chunks } ) ;
133
132
} ) ;
You can’t perform that action at this time.
0 commit comments