Skip to content

Commit f4d237a

Browse files
committed
2 parents ed389fc + 63d1123 commit f4d237a

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
# firebot-custom-scripts-types
2-
TypeScript types for Firebot's Custom Scripts
1+
TypeScript types for Firebot's Custom Scripts
2+
3+
```shell
4+
npm i -D @crowbartools/firebot-custom-scripts-types
5+
```

types/modules/command-manager.d.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,21 @@ export type CommandDefinition = {
8181
fallbackSubcommand?: SubCommand | undefined;
8282
};
8383

84+
type UserCommand = {
85+
trigger: string;
86+
args: string[];
87+
triggeredSubcmd?: CommandDefinition;
88+
isInvalidSubcommandTrigger: boolean;
89+
triggeredArg?: string;
90+
subcommandId?: string;
91+
commandSender: string;
92+
senderRoles: string[];
93+
};
94+
8495
type SystemCommandTriggerEvent = {
8596
command: CommandDefinition;
8697
commandOptions: Record<string, any>;
87-
userCommand: {
88-
trigger: string;
89-
args: string[];
90-
triggeredSubcmd?: CommandDefinition;
91-
isInvalidSubcommandTrigger: boolean;
92-
triggeredArg?: string;
93-
subcommandId?: string;
94-
commandSender: string;
95-
senderRoles: string[];
96-
};
98+
userCommand: UserCommand;
9799
};
98100

99101
type BasicCommandDefinition = Omit<

types/modules/game-manager.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ export type GameManager = {
9898
* @param game that should be registered.
9999
*/
100100
registerGame: (game: FirebotGame) => void;
101-
getGameSettings: (string) => GameSettings;
101+
getGameSettings: (gameId: string) => GameSettings;
102102
};

0 commit comments

Comments
 (0)