diff --git a/src/constants.ts b/src/constants.ts index acc7490..7e95fa4 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,3 +1,22 @@ export const GUILD_ID = '923671181020766230'; export const DEBUG_CHANNEL_ID = '977401259260788756'; export const POLYCAT_CHANNEL_ID = '977797790749032448'; + +export const ETA_REGEX = /\beta\b/i; +export const ETA_MESSAGES = [ + 'Sometime', + 'Some day', + 'Not far', + 'The future', + 'Never', + 'Perhaps tomorrow?', + 'There are no ETAs', + 'No', + 'Nah', + 'Yes', + 'Yas', + 'Next month', + 'Next year', + 'Next week', + 'In PolyMC 2.0.0', +]; diff --git a/src/index.ts b/src/index.ts index 96957dd..fc77e23 100644 --- a/src/index.ts +++ b/src/index.ts @@ -105,25 +105,9 @@ client.once('ready', async () => { return; } - if (e.cleanContent.match(/(\b| )(eta|ETA)( |\?|!|\b)/)) { + if (e.cleanContent.match(BuildConfig.ETA_REGEX)) { await e.reply( - `${random([ - 'Sometime', - 'Some day', - 'Not far', - 'The future', - 'Never', - 'Perhaps tomorrow?', - 'There are no ETAs', - 'No', - 'Nah', - 'Yes', - 'Yas', - 'Next month', - 'Next year', - 'Next week', - 'In PolyMC 2.0.0', - ])} <:pofat:964546613194420294>` + `${random(BuildConfig.ETA_MESSAGES)} <:pofat:964546613194420294>` ); }