slim down constants

This commit is contained in:
Ryan Cao 2022-08-29 11:31:15 +08:00
parent e095aeef11
commit 0aaee0e0f1
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F
3 changed files with 2 additions and 35 deletions

View file

@ -83,20 +83,6 @@ client.once('ready', async () => {
if (e.author === client.user) return;
if (
process.env.NODE_ENV === 'development' &&
e.channelId !== BuildConfig.DEBUG_CHANNEL_ID &&
e.channel.type === ChannelType.DM &&
!BuildConfig.DM_TESTERS.includes(e.author.id)
) {
return;
} else if (
process.env.NODE_ENV !== 'development' &&
e.channelId === BuildConfig.DEBUG_CHANNEL_ID
) {
return;
}
if (e.cleanContent.match(BuildConfig.ETA_REGEX)) {
await e.reply(
`${random(BuildConfig.ETA_MESSAGES)} <:pofat:964546613194420294>`
@ -114,19 +100,6 @@ client.once('ready', async () => {
client.on('interactionCreate', async (interaction) => {
if (!interaction.isChatInputCommand()) return;
if (
process.env.NODE_ENV === 'development' &&
interaction.channelId !== BuildConfig.DEBUG_CHANNEL_ID
) {
return;
}
if (
process.env.NODE_ENV !== 'development' &&
interaction.channelId === BuildConfig.DEBUG_CHANNEL_ID
) {
return;
}
const { commandName } = interaction;
if (commandName === 'ping') {