Update for docker

imgbot
kieranrobson 2022-05-24 00:38:47 +01:00
parent 2348c87ec1
commit db70776390
3 changed files with 8 additions and 9 deletions

View File

@ -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"]

View File

@ -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);

View File

@ -20,4 +20,4 @@ require("./handler")(client);
client.login(config.token);
client.login(cprocess.env.DISCORD_TOKEN);