Skip to content

Commit

Permalink
Fixed a fuckup I made
Browse files Browse the repository at this point in the history
  • Loading branch information
Slingexe authored Feb 14, 2025
1 parent f19c385 commit 38d86a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions commands/mud/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ module.exports = {

fs.writeFileSync(configPath, JSON.stringify(config, null, 4));
console.log('New mudtoken has been set');
log("---- Settings.js - Auth ----", `New mudtoken has been set: ${env.LOG_SENSITIVE_INFO === 'true' ? chatToken : "HIDDEN"}`, payload, `${env.LOG_SENSITIVE_INFO === true ? result : "HIDDEN"}`, config, configPath);
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);
await interaction.reply({content: `Config updated successfully! Token has been set.`, flags: MessageFlags.Ephemeral });
} else {
log("---- Settings.js - Auth ----", 'Failed to update mudtoken', payload, result);
Expand Down Expand Up @@ -206,10 +206,10 @@ module.exports = {

fs.writeFileSync(mappingsPath, JSON.stringify(channelMapping, null, 4));

log("---- Settings.js - Setup ----", 'Sucessfully ran setup', `${env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result, channelMapping, mappingsPath);
log("---- Settings.js - Setup ----", 'Sucessfully ran setup', `${process.env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result, channelMapping, mappingsPath);
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 });
} else {
log("---- Settings.js - Setup ----", 'Failed to run setup', `${env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
log("---- Settings.js - Setup ----", 'Failed to run setup', `${process.env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
console.error(result);
await interaction.reply({content: `Failed to run setup. Server response: ${result.msg || 'Unknown error'}`, flags: MessageFlags.Ephemeral });
}
Expand Down
6 changes: 3 additions & 3 deletions events/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ module.exports = {
});
const result = await response.json();
if (result.ok === true) {
log(`---- messageCreate.js - Send Message ----`, `${env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
log(`---- messageCreate.js - Send Message ----`, `${process.env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
message.react('✅');
//console.log(`Message sent to ${setChannel} successfully. Message: ${finalMessage}`);
} else {
log(`---- messageCreate.js - Send Message ----`, `${env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
log(`---- messageCreate.js - Send Message ----`, `${process.env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, result);
message.react('❌');
console.log(`Failed to send message. Server response: ${result.msg || 'Unknown error'}`);
}
} catch (error) {
log(`---- messageCreate.js - Send Message ----`, `${env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, error);
log(`---- messageCreate.js - Send Message ----`, `${process.env.LOG_SENSITIVE_INFO === true ? payload : "HIDDEN"}`, error);
message.react('❌');
console.log(error);
}
Expand Down

0 comments on commit 38d86a7

Please sign in to comment.