@@ -87,25 +87,26 @@ export const Helpers = {
87
87
* @param users Provided list of user ids.
88
88
*/
89
89
ByUser ( users : string [ ] ) : Helper {
90
- return ( { command, message, interaction } ) => users . includes ( ( command . type === " slash" ? interaction : message ) . member ?. user . id ! ) ;
90
+ return ( { command, message, interaction } ) => users . includes ( ( command . type === ' slash' ? interaction : message ) . member ?. user . id ! ) ;
91
91
} ,
92
92
93
93
/**
94
94
* Checks if the user who used the command is a discord bot or not.
95
95
*/
96
96
IsBot ( ) : Helper {
97
- return ( { command, message, interaction } ) => ( command . type === " slash" ? interaction : message ) . member ?. user . bot ! ;
97
+ return ( { command, message, interaction } ) => ( command . type === ' slash' ? interaction : message ) . member ?. user . bot ! ;
98
98
} ,
99
99
100
100
/**
101
101
* Checks if the command was used in a discord server or not.
102
102
*/
103
103
InServer ( ) : Helper {
104
- return ( { command, message, interaction } ) => ( command . type === " slash" ? interaction : message ) . guild !== null ;
104
+ return ( { command, message, interaction } ) => ( command . type === ' slash' ? interaction : message ) . guild !== null ;
105
105
} ,
106
106
107
107
/**
108
- * Accepts a helper function and returns true if the condition doesn't pass. Mimics `!` operator.
108
+ * Accepts a helper function and returns true if the condition doesn't pass.
109
+ * Mimics `!` operator.
109
110
* @param condition Helper function to test.
110
111
* @example
111
112
* export default new SparkCommand({
@@ -124,7 +125,8 @@ export const Helpers = {
124
125
} ,
125
126
126
127
/**
127
- * Accepts 2 helper functions and if one turns out to be true then the condition passes. Mimics `||` operator.
128
+ * Accepts 2 helper functions and if one turns out to be true then the condition passes.
129
+ * Mimics `||` operator.
128
130
* @param x First helper function to test.
129
131
* @param y Second helper function to test.
130
132
* @example
@@ -139,7 +141,7 @@ export const Helpers = {
139
141
* ]
140
142
* });
141
143
*/
142
- Or ( x : Helper , y : Helper ) : Helper {
144
+ Or ( x : Helper , y : Helper ) : Helper {
143
145
return ( o ) => x ( o ) || y ( o ) ;
144
- }
145
- }
146
+ } ,
147
+ } ;
0 commit comments