commandbot
Version:
A framework that helps you create your own Discord bot easier.
16 lines (15 loc) • 588 B
JavaScript
/**
* Regular expressions used globally to perform name checking
* @property {RegExp} baseName - base command name (used for context menu)
* @property {RegExp} chatName - chat command name
* @property {RegExp} chatDescription - chat command description
* @property {RegExp} separator - argument and command separators
* @property {RegExp} prefix - global and guild-scoped prefixes
*/
export const CommandRegExps = {
baseName: /^.{1,32}$/,
chatName: /^[\w-]{1,32}$/,
chatDescription: /^.{1,100}$/,
separator: /[^ ]{1,}$/,
prefix: /[^/ ]{1,}$/,
};