refactor: move ETA values to constants

This commit is contained in:
Sefa Eyeoglu 2022-06-14 12:13:56 +02:00
parent fe821ecd36
commit e1622eb545
No known key found for this signature in database
GPG key ID: C10411294912A422
2 changed files with 21 additions and 18 deletions

View file

@ -1,3 +1,22 @@
export const GUILD_ID = '923671181020766230'; export const GUILD_ID = '923671181020766230';
export const DEBUG_CHANNEL_ID = '977401259260788756'; export const DEBUG_CHANNEL_ID = '977401259260788756';
export const POLYCAT_CHANNEL_ID = '977797790749032448'; 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',
];

View file

@ -105,25 +105,9 @@ client.once('ready', async () => {
return; return;
} }
if (e.cleanContent.match(/(\b| )(eta|ETA)( |\?|!|\b)/)) { if (e.cleanContent.match(BuildConfig.ETA_REGEX)) {
await e.reply( await e.reply(
`${random([ `${random(BuildConfig.ETA_MESSAGES)} <:pofat:964546613194420294>`
'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>`
); );
} }