Skip to content

Commit

Permalink
fix: bell sound path
Browse files Browse the repository at this point in the history
  • Loading branch information
Amber-Williams committed Aug 4, 2023
1 parent ca3cb0e commit 4f10466
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modes/timer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import path from "path";

import player from "./../lib/player.js";
import logger from "./../logger.js";
import * as utils from "./../utils.js";

const { __dirname } = utils.fileDirName(import.meta);
const bellSoundFile = path.join(__dirname, "/../media/bells.mp3");

export const option = "-t, --timer [time unit] [number of units]";
export const optionDef = `Timer mode
Expand All @@ -13,7 +19,7 @@ time units available:

const soundAlarm = () => {
player
.play("./media/bells.mp3", (err) => {
.play(bellSoundFile, (err) => {
if (err) console.log(`Could not play sound: ${err}`);
})
.then(() => {
Expand Down

0 comments on commit 4f10466

Please sign in to comment.