bancho.js 0.11.2 → 0.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/index.d.ts +21 -21
- package/index.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://nodei.co/npm/bancho.js/)
|
|
4
4
|
[](https://git.cartooncraft.fr/ThePooN/bancho.js/commits/master)
|
|
5
5
|
|
|
6
|
-
## Current release: 0.11.
|
|
6
|
+
## Current release: 0.11.4
|
|
7
7
|
|
|
8
8
|
# Introduction
|
|
9
9
|
|
package/index.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ declare module "bancho.js" {
|
|
|
132
132
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
class BanchoUser extends EventEmitter {
|
|
135
|
+
export class BanchoUser extends EventEmitter {
|
|
136
136
|
/**
|
|
137
137
|
* Creates an instance of BanchoUser.
|
|
138
138
|
* @param banchojs Bancho.js client this user was instancied by
|
|
@@ -216,7 +216,7 @@ declare module "bancho.js" {
|
|
|
216
216
|
/**
|
|
217
217
|
* Class describing what is returned after a WHOIS query on an online user
|
|
218
218
|
*/
|
|
219
|
-
class BanchoWhoisReturn {
|
|
219
|
+
export class BanchoWhoisReturn {
|
|
220
220
|
/**
|
|
221
221
|
* Username of the queried user
|
|
222
222
|
*/
|
|
@@ -234,7 +234,7 @@ declare module "bancho.js" {
|
|
|
234
234
|
/**
|
|
235
235
|
* Contains properties returned by the BanchoBot !stats command that can't be set in BanchoUser.
|
|
236
236
|
*/
|
|
237
|
-
class BanchoBotStatsReturn {
|
|
237
|
+
export class BanchoBotStatsReturn {
|
|
238
238
|
user: BanchoUser
|
|
239
239
|
/**
|
|
240
240
|
* Truncated value of levels (eg. 102)
|
|
@@ -276,7 +276,7 @@ declare module "bancho.js" {
|
|
|
276
276
|
/**
|
|
277
277
|
* Represents a discussion channel (not including PMs)
|
|
278
278
|
*/
|
|
279
|
-
class BanchoChannel extends EventEmitter {
|
|
279
|
+
export class BanchoChannel extends EventEmitter {
|
|
280
280
|
/**
|
|
281
281
|
* @param name Channel name as it is referred by on IRC (including #)
|
|
282
282
|
*/
|
|
@@ -318,7 +318,7 @@ declare module "bancho.js" {
|
|
|
318
318
|
on(event: "PART", listener: (member: BanchoChannelMember) => void): this
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
class BanchoMultiplayerChannel extends BanchoChannel {
|
|
321
|
+
export class BanchoMultiplayerChannel extends BanchoChannel {
|
|
322
322
|
/**
|
|
323
323
|
* @param name Channel name as it is referred by on IRC (including #)
|
|
324
324
|
*/
|
|
@@ -331,7 +331,7 @@ declare module "bancho.js" {
|
|
|
331
331
|
*
|
|
332
332
|
* Highly recommended to await updateSettings before manipulating (else some properties will be null).
|
|
333
333
|
*/
|
|
334
|
-
class BanchoLobby extends EventEmitter {
|
|
334
|
+
export class BanchoLobby extends EventEmitter {
|
|
335
335
|
channel: BanchoMultiplayerChannel
|
|
336
336
|
/**
|
|
337
337
|
* Multiplayer lobby ID (used in multiplayer history links)
|
|
@@ -601,7 +601,7 @@ declare module "bancho.js" {
|
|
|
601
601
|
on(event: "userNotFoundUsername", listener: (username: string) => void): this
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
class BanchoLobbyPlayer {
|
|
604
|
+
export class BanchoLobbyPlayer {
|
|
605
605
|
lobby: BanchoLobby
|
|
606
606
|
user: BanchoUser
|
|
607
607
|
/**
|
|
@@ -617,13 +617,13 @@ declare module "bancho.js" {
|
|
|
617
617
|
score: BanchoLobbyPlayerScore
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
-
class BanchoLobbyPlayerScore {
|
|
620
|
+
export class BanchoLobbyPlayerScore {
|
|
621
621
|
score: number
|
|
622
622
|
pass: boolean
|
|
623
623
|
player: BanchoLobbyPlayer
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
class BanchoMod {
|
|
626
|
+
export class BanchoMod {
|
|
627
627
|
enumValue: number
|
|
628
628
|
shortMod: string
|
|
629
629
|
longMod: string
|
|
@@ -633,7 +633,7 @@ declare module "bancho.js" {
|
|
|
633
633
|
* A Bancho channel user mode, or "IRC modes".
|
|
634
634
|
* Used by Bancho to mark someone in a channel as an IRC user or a moderator.
|
|
635
635
|
*/
|
|
636
|
-
class BanchoChannelMemberMode {
|
|
636
|
+
export class BanchoChannelMemberMode {
|
|
637
637
|
/**
|
|
638
638
|
* @param ircLetter Letter used in the MODE command to represent this mode
|
|
639
639
|
* @param name Name to describe the mode
|
|
@@ -642,7 +642,7 @@ declare module "bancho.js" {
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
/** A Bancho channel member */
|
|
645
|
-
class BanchoChannelMember {
|
|
645
|
+
export class BanchoChannelMember {
|
|
646
646
|
/**
|
|
647
647
|
* @param client
|
|
648
648
|
* @param channel
|
|
@@ -685,7 +685,7 @@ declare module "bancho.js" {
|
|
|
685
685
|
/**
|
|
686
686
|
* Static class with a property for each mods and methods to manipulate them
|
|
687
687
|
*/
|
|
688
|
-
|
|
688
|
+
type BanchoModsTypes = {
|
|
689
689
|
None: BanchoMod
|
|
690
690
|
NoFail: BanchoMod
|
|
691
691
|
Easy: BanchoMod
|
|
@@ -904,23 +904,23 @@ declare module "bancho.js" {
|
|
|
904
904
|
}
|
|
905
905
|
|
|
906
906
|
/** Compares the provided object and return true if the object is an instance of BanchoMod. */
|
|
907
|
-
export function isBanchoMod(mod): boolean
|
|
907
|
+
export function isBanchoMod(mod: BanchoMod): boolean
|
|
908
908
|
/** Compares the provided object and return true if the object is an instance of BanchoUser. */
|
|
909
|
-
export function isBanchoUser(user): boolean
|
|
909
|
+
export function isBanchoUser(user: BanchoUser): boolean
|
|
910
910
|
/** Compares the provided object and return true if the object is an instance of BanchoChannel. */
|
|
911
|
-
export function isBanchoChannel(channel): boolean
|
|
911
|
+
export function isBanchoChannel(channel: BanchoChannel): boolean
|
|
912
912
|
/** Compares the provided object and return true if the object is an instance of BanchoMultiplayerChannel. */
|
|
913
|
-
export function isBanchoMultiplayerChannel(channel): boolean
|
|
913
|
+
export function isBanchoMultiplayerChannel(channel: BanchoMultiplayerChannel): boolean
|
|
914
914
|
/** Compares the provided object and return true if the object is an instance of BanchoLobby. */
|
|
915
|
-
export function isBanchoLobby(lobby): boolean
|
|
915
|
+
export function isBanchoLobby(lobby: BanchoLobby): boolean
|
|
916
916
|
/** Compares the provided object and return true if the object is an instance of BanchoChannelMember. */
|
|
917
|
-
export function isBanchoChannelMember(member): boolean
|
|
917
|
+
export function isBanchoChannelMember(member: BanchoChannelMember): boolean
|
|
918
918
|
/** Compares the provided object and return true if the object is an instance of BanchoMessage. */
|
|
919
|
-
export function isBanchoMessage(message): boolean
|
|
919
|
+
export function isBanchoMessage(message: BanchoMessage): boolean
|
|
920
920
|
/** Compares the provided object and return true if the object is an instance of ChannelMessage. */
|
|
921
|
-
export function isChannelMessage(message): boolean
|
|
921
|
+
export function isChannelMessage(message: ChannelMessage): boolean
|
|
922
922
|
/** Compares the provided object and return true if the object is an instance of PrivateMessage. */
|
|
923
|
-
export function isPrivateMessage(message): boolean
|
|
923
|
+
export function isPrivateMessage(message: PrivateMessage): boolean
|
|
924
924
|
|
|
925
925
|
/**
|
|
926
926
|
* Contains the different connect states: Disconnected, Connecting, Reconnecting, Connected.
|
package/index.js
CHANGED
|
@@ -21,6 +21,17 @@ class Banchojs {
|
|
|
21
21
|
this.BanchoLobbyTeams = require("./lib/Multiplayer/Enums/BanchoLobbyTeams");
|
|
22
22
|
this.BanchoLobbyWinConditions = require("./lib/Multiplayer/Enums/BanchoLobbyWinConditions");
|
|
23
23
|
this.BanchoMods = require("./lib/Multiplayer/Enums/BanchoMods");
|
|
24
|
+
this.BanchoUser = require("./lib/BanchoUser");
|
|
25
|
+
this.BanchoWhoisReturn = require("./lib/IrcCommands/whois/BanchoWhoisReturn");
|
|
26
|
+
this.BanchoBotStatsReturn = require("./lib/StatsCommand/BanchoBotStatsReturn");
|
|
27
|
+
this.BanchoChannel = require("./lib/BanchoChannel");
|
|
28
|
+
this.BanchoMultiplayerChannel = require("./lib/BanchoMultiplayerChannel");
|
|
29
|
+
this.BanchoLobby = require("./lib/Multiplayer/BanchoLobby");
|
|
30
|
+
this.BanchoLobbyPlayer = require("./lib/Multiplayer/BanchoLobbyPlayer");
|
|
31
|
+
this.BanchoLobbyPlayerScore = require("./lib/Multiplayer/BanchoLobbyPlayerScore");
|
|
32
|
+
this.BanchoMod = require("./lib/Multiplayer/BanchoMod");
|
|
33
|
+
this.BanchoChannelMemberMode = require("./lib/BanchoChannelMemberMode");
|
|
34
|
+
this.BanchoChannelMember = require("./lib/BanchoChannelMember");
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
/**
|