File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1+ import { IS_DEV } from "common/envs/constants" ;
2+
13export const sendDiscordMessage = async ( content : string , channel : string ) => {
2- const webhookUrl = {
4+ let webhookUrl = {
35 members : process . env . DISCORD_WEBHOOK_MEMBERS ,
46 general : process . env . DISCORD_WEBHOOK_GENERAL ,
57 } [ channel ]
68
9+ if ( IS_DEV ) webhookUrl = process . env . DISCORD_WEBHOOK_DEV
10+
711 if ( ! webhookUrl ) return
812
913 const response = await fetch ( webhookUrl ! , {
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export function isModId(id: string) {
1616}
1717
1818export const ENV = isProd ( ) ? 'prod' : 'dev'
19+ export const IS_PROD = ENV === 'prod'
20+ export const IS_DEV = ENV === 'dev'
1921
2022export const LOCAL_WEB_DOMAIN = 'localhost:3000' ;
2123export const LOCAL_BACKEND_DOMAIN = 'localhost:8088' ;
You can’t perform that action at this time.
0 commit comments