From db7077639091e088c09bb6836c5dec28fb9e5b87 Mon Sep 17 00:00:00 2001 From: kieranrobson Date: Tue, 24 May 2022 00:38:47 +0100 Subject: [PATCH] Update for docker --- dockerfile | 11 +++++------ events/messageCreate.js | 4 ++-- index.js | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dockerfile b/dockerfile index c635867..825a7af 100644 --- a/dockerfile +++ b/dockerfile @@ -1,18 +1,17 @@ FROM node:16.15.0 # Create the directory! -RUN mkdir -p /usr/src/bot -WORKDIR /usr/src/bot +RUN mkdir -p /usr/hullcss +WORKDIR /usr/hullcss # Copy and Install our bot -COPY package.json /usr/src/bot +COPY package.json /usr/hullcss RUN npm install # Our precious bot -COPY . /usr/src/bot +COPY . /usr/hullcss # Start me! -EXPOSE 5001 +EXPOSE 5002 VOLUME ["latest"] -HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js CMD ["node", "index.js"] \ No newline at end of file diff --git a/events/messageCreate.js b/events/messageCreate.js index 1b83724..ffe0ce2 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -5,12 +5,12 @@ client.on("messageCreate", async (message) => { if ( message.author.bot || !message.guild || - !message.content.toLowerCase().startsWith(config.prefix) + !message.content.toLowerCase().startsWith(process.env.PREFIX) ) return; const [cmd, ...args] = message.content - .slice(config.prefix.length) + .slice(process.env.PREFIX.length) .trim() .split(/ +/g); diff --git a/index.js b/index.js index 4d600b6..f73a76e 100644 --- a/index.js +++ b/index.js @@ -20,4 +20,4 @@ require("./handler")(client); -client.login(config.token); \ No newline at end of file +client.login(cprocess.env.DISCORD_TOKEN); \ No newline at end of file