File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ DEFAULT_ALLOWED_SERVERS=
2424# Only required if relevant feature is used
2525# FISHFISH_API_KEY=
2626
27+ # DEFAULT_SUCCESS_EMOJI=
28+ # DEFAULT_ERROR_EMOJI=
2729
2830# ==========================
2931# DEVELOPMENT
Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ const envType = z.object({
3939 PHISHERMAN_API_KEY : z . string ( ) . optional ( ) ,
4040 FISHFISH_API_KEY : z . string ( ) . optional ( ) ,
4141
42+ DEFAULT_SUCCESS_EMOJI : z . string ( ) . optional ( ) . default ( "✅" ) ,
43+ DEFAULT_ERROR_EMOJI : z . string ( ) . optional ( ) . default ( "❌" ) ,
44+
4245 DB_HOST : z . string ( ) . optional ( ) ,
4346 DB_PORT : z . preprocess ( ( v ) => Number ( v ) , z . number ( ) ) . optional ( ) ,
4447 DB_USER : z . string ( ) . optional ( ) ,
Original file line number Diff line number Diff line change 11import { GuildPluginData } from "knub" ;
22import { CommonPluginType } from "../types.js" ;
3+ import { env } from "../../../env.js" ;
34
45export function getSuccessEmoji ( pluginData : GuildPluginData < CommonPluginType > ) {
5- return pluginData . config . get ( ) . success_emoji ?? "✅" ;
6+ return pluginData . config . get ( ) . success_emoji ?? env . DEFAULT_SUCCESS_EMOJI ;
67}
78
89export function getErrorEmoji ( pluginData : GuildPluginData < CommonPluginType > ) {
9- return pluginData . config . get ( ) . error_emoji ?? "❌" ;
10+ return pluginData . config . get ( ) . error_emoji ?? env . DEFAULT_ERROR_EMOJI ;
1011}
You can’t perform that action at this time.
0 commit comments