-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge: all feature from byteblaze/next branch (#166)
* add: base for /blacklist command (#101) This commit will add the base for /blacklist command with raw string and not translated. Also this commit is not tested * merge: latest update from main branch (#146) * improve: logging system interface * add: host option to bind into 0.0.0.0 ip address * add: host option to config file * add: spanish lang to ByteBlaze * add: blacklist cmmand; merge: all filter command This commit fill merge all filter command to 1 file to optimize and reduce code. Also this command introduce brand new command named blacklist to block user/guild rom using bot * remove: file command due to lavalink restriction * fix: 24/7 rejoin bug (#137) * add: MAX Length for a song command (user wide, some command maynot work, #86) * add: rewritten sharding system * fix: sometimes bot leave server suddenly * add: command sýtem for cluster to get mainstream data from primary cluster * improve: code standard * fix: build workflow failed * fix: cluster crash * remove: internal rainlink * fix: build fail * add: playerStop back * update: all outdated package * fix: cluster mode duplicate forks remove: youtube download feature (#160) * remove: some useless await
- Loading branch information
Showing
136 changed files
with
384 additions
and
7,370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Worker } from 'node:cluster' | ||
import { ClusterManager } from '../cluster/core.js' | ||
|
||
export interface ClusterManagerOptions { | ||
shardsPerClusters: number | ||
totalClusters: number | ||
} | ||
|
||
export interface WorkerMessage { | ||
cmd: string | ||
args: Record<string, unknown> | ||
} | ||
|
||
export interface WorkerResponse { | ||
response: unknown | ||
} | ||
|
||
export abstract class ClusterCommand { | ||
public get name(): string { | ||
throw new Error(`This command doesn't have name`) | ||
} | ||
|
||
public async execute( | ||
manager: ClusterManager, | ||
worker: Worker, | ||
message: WorkerMessage | ||
): Promise<WorkerResponse> { | ||
throw new Error(`This command doesn't have execute function`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ClusterCommand, WorkerMessage, WorkerResponse } from '../../@types/Cluster.js' | ||
import { ClusterManager } from '../core.js' | ||
import { Worker } from 'node:cluster' | ||
|
||
export default class extends ClusterCommand { | ||
public get name(): string { | ||
return 'all_worker_pid' | ||
} | ||
|
||
public async execute( | ||
manager: ClusterManager, | ||
worker: Worker, | ||
message: WorkerMessage | ||
): Promise<WorkerResponse> { | ||
return { | ||
response: manager.workerPID.full.map((value) => value[1].process.pid), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ClusterCommand, WorkerMessage, WorkerResponse } from '../../@types/Cluster.js' | ||
import { ClusterManager } from '../core.js' | ||
import { Worker } from 'node:cluster' | ||
|
||
export default class extends ClusterCommand { | ||
public get name(): string { | ||
return 'all_worker_id' | ||
} | ||
|
||
public async execute( | ||
manager: ClusterManager, | ||
worker: Worker, | ||
message: WorkerMessage | ||
): Promise<WorkerResponse> { | ||
return { | ||
response: manager.workerPID.full.map((value) => value[0]), | ||
} | ||
} | ||
} |
Oops, something went wrong.