Skip to content

Commit 386c83c

Browse files
authoredApr 13, 2023
fix(lib): updating cli to handle download options
1 parent b01f837 commit 386c83c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎src/bin/commander.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type savedParams = {
1010
bot?: string
1111
}
1212
export interface InterfaceCLI extends commander.Command {
13-
1413
host?: string
1514
port?: number
1615
tls?: boolean
@@ -23,6 +22,7 @@ export interface InterfaceCLI extends commander.Command {
2322
retry?: number
2423
passivePort?: number
2524
ipv6?: boolean
25+
throttle?: number
2626
randomize?: boolean
2727
botNameMatch?: boolean
2828
queue?: RegExp

‎src/bin/xdccjs.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ export default class XdccJSbin extends Profiles {
8080
if (start > 0) {
8181
this.clearMSG();
8282
}
83-
const job = await xdccJS.download(bot, download, this.program.ipv6);
83+
const job = await xdccJS.download(
84+
bot,
85+
download,
86+
{ ipv6: this.program.ipv6, throttle: this.program.throttle },
87+
);
8488
if (!this.program.path) {
8589
job.on('pipe', (stream) => {
8690
stream.pipe(process.stdout);

0 commit comments

Comments
 (0)