File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,14 @@ const ChannelTypes = Object.values(ChannelType).filter((type) => typeof type ===
34
34
const GuildChannelTypes = ChannelTypes . filter ( ( type ) => type !== ChannelType . DM && type !== ChannelType . GroupDM ) as readonly ChannelType [ ] ;
35
35
36
36
export class Command < PreParseReturn = Args , Options extends Command . Options = Command . Options > extends AliasPiece < Options , 'commands' > {
37
+ /**
38
+ * The raw name of the command as provided through file name or constructor options.
39
+ *
40
+ * This is exactly what is set by the developer, completely unmodified internally by the framework.
41
+ * Unlike the `name` which gets lowercased for storing it uniquely in the {@link CommandStore}.
42
+ */
43
+ public rawName : string ;
44
+
37
45
/**
38
46
* A basic summary about the command
39
47
* @since 1.0.0
@@ -97,7 +105,10 @@ export class Command<PreParseReturn = Args, Options extends Command.Options = Co
97
105
* @param options Optional Command settings.
98
106
*/
99
107
public constructor ( context : Command . LoaderContext , options : Options = { } as Options ) {
100
- super ( context , { ...options , name : ( options . name ?? context . name ) . toLowerCase ( ) } ) ;
108
+ const name = options . name ?? context . name ;
109
+ super ( context , { ...options , name : name . toLowerCase ( ) } ) ;
110
+
111
+ this . rawName = name ;
101
112
this . description = options . description ?? '' ;
102
113
this . detailedDescription = options . detailedDescription ?? '' ;
103
114
this . strategy = new FlagUnorderedStrategy ( options ) ;
You can’t perform that action at this time.
0 commit comments