Add /lower and /upper commands

5515f2810582256a02d1b2363436022df752f2f0

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +24 -0Ignore whitespace
public/scripts/slash-commands.js+24 -0
@@ -1827,6 +1827,30 @@ export function initDefaultSlashCommands() {
1827 </div>1827 </div>
1828 `,1828 `,
1829 }));1829 }));
1830 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
1831 name: 'upper',
1832 aliases: ['uppercase', 'to-upper'],
1833 callback: (_, text) => typeof text === 'string' ? text.toUpperCase() : '',
1834 returns: 'uppercase string',
1835 unnamedArgumentList: [
1836 new SlashCommandArgument(
1837 'string', [ARGUMENT_TYPE.STRING], true, false,
1838 ),
1839 ],
1840 helpString: 'Converts the provided string to uppercase.',
1841 }));
1842 SlashCommandParser.addCommandObject(SlashCommand.fromProps({
1843 name: 'lower',
1844 aliases: ['lowercase', 'to-lower'],
1845 callback: (_, text) => typeof text === 'string' ? text.toLowerCase() : '',
1846 returns: 'lowercase string',
1847 unnamedArgumentList: [
1848 new SlashCommandArgument(
1849 'string', [ARGUMENT_TYPE.STRING], true, false,
1850 ),
1851 ],
1852 helpString: 'Converts the provided string to lowercase.',
1853 }));
18301854
1831 registerVariableCommands();1855 registerVariableCommands();
1832}1856}