@@ -137,7 +137,7 @@ module.exports = {
137
137
138
138
fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) ) ;
139
139
console . log ( 'New mudtoken has been set' ) ;
140
- log ( "---- Settings.js - Auth ----" , `New mudtoken has been set: ${ process . env . LOG_SENSITIVE_INFO === 'true' ? chatToken : "HIDDEN" } ` , payload , `${ process . env . LOG_SENSITIVE_INFO === true ? result : "HIDDEN" } ` , config , configPath ) ;
140
+ log ( "---- Settings.js - Auth ----" , `New mudtoken has been set: ${ process . env . LOG_SENSITIVE_INFO ? chatToken : "HIDDEN" } ` , payload , `${ process . env . LOG_SENSITIVE_INFO ? result : "HIDDEN" } ` , process . env . LOG_SENSITIVE_INFO ? config : 'HIDDEN' , configPath ) ;
141
141
await interaction . reply ( { content : `Config updated successfully! Token has been set.` , flags : MessageFlags . Ephemeral } ) ;
142
142
} else {
143
143
log ( "---- Settings.js - Auth ----" , 'Failed to update mudtoken' , payload , result ) ;
@@ -206,10 +206,10 @@ module.exports = {
206
206
207
207
fs . writeFileSync ( mappingsPath , JSON . stringify ( channelMapping , null , 4 ) ) ;
208
208
209
- log ( "---- Settings.js - Setup ----" , 'Sucessfully ran setup' , `${ process . env . LOG_SENSITIVE_INFO === true ? payload : "HIDDEN" } ` , result , channelMapping , mappingsPath ) ;
209
+ log ( "---- Settings.js - Setup ----" , 'Sucessfully ran setup' , `${ process . env . LOG_SENSITIVE_INFO ? payload : "HIDDEN" } ` , result , channelMapping , mappingsPath ) ;
210
210
await interaction . reply ( { content : 'Server has been set up successfully, and user channels have been created or reused under the "chat" category.' , flags : MessageFlags . Ephemeral } ) ;
211
211
} else {
212
- log ( "---- Settings.js - Setup ----" , 'Failed to run setup' , `${ process . env . LOG_SENSITIVE_INFO === true ? payload : "HIDDEN" } ` , result ) ;
212
+ log ( "---- Settings.js - Setup ----" , 'Failed to run setup' , `${ process . env . LOG_SENSITIVE_INFO ? payload : "HIDDEN" } ` , result ) ;
213
213
console . error ( result ) ;
214
214
await interaction . reply ( { content : `Failed to run setup. Server response: ${ result . msg || 'Unknown error' } ` , flags : MessageFlags . Ephemeral } ) ;
215
215
}
@@ -242,7 +242,7 @@ module.exports = {
242
242
243
243
fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) , 'utf-8' ) ;
244
244
245
- log ( "---- Settings.js - Manage Users ----" , 'Successfully updated settings' , username , pullHistory , config , configPath ) ;
245
+ log ( "---- Settings.js - Manage Users ----" , 'Successfully updated settings' , username , pullHistory , process . env . LOG_SENSITIVE_INFO ? config : 'HIDDEN' , configPath ) ;
246
246
await interaction . reply ( { content : `Successfully updated settings for user **${ username } **. Pull history: **${ pullHistory ? 'Enabled' : 'Disabled' } **` , flags : MessageFlags . Ephemeral } ) ;
247
247
} catch ( error ) {
248
248
console . error ( error ) ;
@@ -263,7 +263,7 @@ module.exports = {
263
263
}
264
264
265
265
fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) , 'utf-8' ) ;
266
- log ( "---- Settings.js - Color ----" , 'Successfully updated setting' , cmdcolorval , config , configPath ) ;
266
+ log ( "---- Settings.js - Color ----" , 'Successfully updated setting' , cmdcolorval , process . env . LOG_SENSITIVE_INFO ? config : 'HIDDEN' , configPath ) ;
267
267
} else {
268
268
log ( "---- Settings.js - Color ----" , 'Invalid color value' , cmdcolorval ) ;
269
269
await interaction . reply ( { content : 'Invalid color value. Please use a single alphanumeric character or "reset"' , flags : MessageFlags . Ephemeral } ) ;
@@ -277,7 +277,7 @@ module.exports = {
277
277
fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) , 'utf-8' ) ;
278
278
279
279
await interaction . reply ( { content : `Successfully updated setting. Ping Detection: **${ value ? 'Enabled' : 'Disabled' } **` , flags : MessageFlags . Ephemeral } ) ;
280
- log ( "---- Settings.js - Ping Detection ----" , 'Successfully updated setting' , value , config , configPath ) ;
280
+ log ( "---- Settings.js - Ping Detection ----" , 'Successfully updated setting' , value , process . env . LOG_SENSITIVE_INFO ? config : 'HIDDEN' , configPath ) ;
281
281
} catch ( error ) {
282
282
console . error ( error ) ;
283
283
await interaction . reply ( { content : 'An error occurred while setting this option. Check console for details.' , flags : MessageFlags . Ephemeral } ) ;
0 commit comments