diff --git a/src/client-options.ts b/src/client-options.ts index 62b4331..cc798ce 100644 --- a/src/client-options.ts +++ b/src/client-options.ts @@ -17,6 +17,12 @@ export interface ClientOptions extends ConnectionOptions { */ username: string; + /** + * Client name. + * Default: 'simple mumble bot' + */ + clientName?: string; + /** * The interval the bot will send pings to the server (in milliseconds). * It has to be less than 30000 (30 seconds), otherwise the server will kick the client. diff --git a/src/client.ts b/src/client.ts index 561b7ab..066ecb2 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,9 +17,11 @@ import { encodeMumbleVersion } from './encode-mumble-version'; import { ClientOptions } from './client-options'; import { ConnectionRejectedError } from './errors'; import { filterPacket } from './rxjs-operators/filter-packet'; +import { platform, release } from 'os'; const defaultOptions: Partial = { port: 64738, + clientName: 'simple mumble bot', pingInterval: 10000, }; @@ -117,8 +119,10 @@ export class Client extends EventEmitter { return await this.socket?.send( Version, Version.create({ - release: 'simple mumble bot', + release: this.options.clientName, version, + os: platform(), + osVersion: release(), }), ); }