Compare commits
2 commits
b3d8755b7d
...
2f9053bcc9
Author | SHA1 | Date | |
---|---|---|---|
2f9053bcc9 | |||
9ed2138bab |
2 changed files with 18 additions and 1 deletions
|
@ -3,6 +3,7 @@ import { Locale } from 'discord-api-types/v9';
|
|||
import { Client, CommandInteraction, MessageEmbed } from 'discord.js';
|
||||
import { getLocale, getLocalizations } from '../../utils/locales';
|
||||
import { getFilename } from '../../utils/misc';
|
||||
import '../../modules/string';
|
||||
|
||||
export default {
|
||||
data: (client: Client) => {
|
||||
|
@ -65,7 +66,7 @@ export default {
|
|||
}, '');
|
||||
|
||||
fields.push({
|
||||
name: category.toUpperCase(),
|
||||
name: category.capitalize(),
|
||||
value: commands_description,
|
||||
});
|
||||
});
|
||||
|
|
16
src/modules/string.ts
Normal file
16
src/modules/string.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
export {};
|
||||
|
||||
declare global {
|
||||
// Declarations
|
||||
interface String {
|
||||
/**
|
||||
* Returns a copy of the string with the first letter capitalized.
|
||||
*/
|
||||
capitalize(): string,
|
||||
}
|
||||
}
|
||||
|
||||
/** Capitalize definition */
|
||||
String.prototype.capitalize = function(this: string) {
|
||||
return this[0].toUpperCase() + this.substring(1);
|
||||
};
|
Loading…
Reference in a new issue