Skip to content

Commit

Permalink
🍩πŸͺπŸŽ‚ Add(ed) lib/errors and file(s) in it, added new things in "app.js"
Browse files Browse the repository at this point in the history
  • Loading branch information
nightlxight committed Oct 7, 2021
1 parent 6087f74 commit e246b21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { client_id } = require('./resources/application/client_id.json');
const { guild_id } = require('./resources/application/guild_id.json');
const path = require('path');
const { activityFunction } = require('./lib/activity/activity.js');
const { error1 } = yaml.load(fs.readFileSync(path.join(__dirname, './lib/errors/1.yml'))); // * fixed typo

const { activity, activityError, activityType } = yaml.load(fs.readFileSync(path.join(__dirname, './lib/activity/activity-status.yml')));
const { activityTypeFunction } = require('./lib/activity/activityType.js');
Expand Down Expand Up @@ -35,7 +36,7 @@ client.once('ready', () => {
statusFunc();
} catch (error) {
let { statusError } = yaml.load(fs.readFileSync(path.join(__dirname, './lib/activity/activity-status.yml')));
console.warn("e");
console.warn(`${statusError}`);
console.error(error);
};
try {
Expand All @@ -55,6 +56,7 @@ client.on('interactionCreate', async interaction => {
try {
await command.execute(interaction);
} catch (error) {
console.warn(`${error1}`);
console.error(error);
return interaction.reply({ content: "❌ There was an error!", ephemeral: true });
}
Expand Down
1 change: 1 addition & 0 deletions lib/errors/1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
error1: "There was an error!"

0 comments on commit e246b21

Please sign in to comment.