@@ -137,7 +137,7 @@ module.exports = {
137137
138138 fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) ) ;
139139 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 ) ;
141141 await interaction . reply ( { content : `Config updated successfully! Token has been set.` , flags : MessageFlags . Ephemeral } ) ;
142142 } else {
143143 log ( "---- Settings.js - Auth ----" , 'Failed to update mudtoken' , payload , result ) ;
@@ -206,10 +206,10 @@ module.exports = {
206206
207207 fs . writeFileSync ( mappingsPath , JSON . stringify ( channelMapping , null , 4 ) ) ;
208208
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 ) ;
210210 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 } ) ;
211211 } 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 ) ;
213213 console . error ( result ) ;
214214 await interaction . reply ( { content : `Failed to run setup. Server response: ${ result . msg || 'Unknown error' } ` , flags : MessageFlags . Ephemeral } ) ;
215215 }
@@ -242,7 +242,7 @@ module.exports = {
242242
243243 fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) , 'utf-8' ) ;
244244
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 ) ;
246246 await interaction . reply ( { content : `Successfully updated settings for user **${ username } **. Pull history: **${ pullHistory ? 'Enabled' : 'Disabled' } **` , flags : MessageFlags . Ephemeral } ) ;
247247 } catch ( error ) {
248248 console . error ( error ) ;
@@ -263,7 +263,7 @@ module.exports = {
263263 }
264264
265265 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 ) ;
267267 } else {
268268 log ( "---- Settings.js - Color ----" , 'Invalid color value' , cmdcolorval ) ;
269269 await interaction . reply ( { content : 'Invalid color value. Please use a single alphanumeric character or "reset"' , flags : MessageFlags . Ephemeral } ) ;
@@ -277,7 +277,7 @@ module.exports = {
277277 fs . writeFileSync ( configPath , JSON . stringify ( config , null , 4 ) , 'utf-8' ) ;
278278
279279 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 ) ;
281281 } catch ( error ) {
282282 console . error ( error ) ;
283283 await interaction . reply ( { content : 'An error occurred while setting this option. Check console for details.' , flags : MessageFlags . Ephemeral } ) ;
0 commit comments