Compare commits
2 commits
6d1dc784af
...
9cd62155d8
Author | SHA1 | Date | |
---|---|---|---|
9cd62155d8 | |||
2083b4ba71 |
4 changed files with 22 additions and 6 deletions
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
FROM node:lts-slim AS base
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
RUN corebpack enable
|
||||||
|
COPY . /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM base AS deps
|
||||||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||||
|
|
||||||
|
FROM base
|
||||||
|
COPY --from=deps /app/node_modules /app/node_modules
|
||||||
|
CMD [ "pnpm", "start" ]
|
3
compose.yaml
Normal file
3
compose.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
services:
|
||||||
|
hiddenphox:
|
||||||
|
build: .
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Discord bot",
|
"description": "Discord bot",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"start": "node src/index.js",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const {Collection, VoiceConnection} = require("@projectdysnomia/dysnomia");
|
const {Collection} = require("@projectdysnomia/dysnomia");
|
||||||
|
|
||||||
const WebSocket = require("ws");
|
//const WebSocket = require("ws");
|
||||||
const ffprobe = require("node-ffprobe");
|
const ffprobe = require("node-ffprobe");
|
||||||
const {ProxyAgent} = require("proxy-agent");
|
//const {ProxyAgent} = require("proxy-agent");
|
||||||
|
|
||||||
const Command = require("#lib/command.js");
|
const Command = require("#lib/command.js");
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ let SOUNDCLOUD_CLIENTID;
|
||||||
hf.voiceStorage = hf.voiceStorage || new Collection();
|
hf.voiceStorage = hf.voiceStorage || new Collection();
|
||||||
const voiceStorage = hf.voiceStorage;
|
const voiceStorage = hf.voiceStorage;
|
||||||
|
|
||||||
if (hf.config.proxy) {
|
/*if (hf.config.proxy) {
|
||||||
process.env.HTTP_PROXY = hf.config.proxy;
|
process.env.HTTP_PROXY = hf.config.proxy;
|
||||||
const agent = new ProxyAgent({});
|
const agent = new ProxyAgent({});
|
||||||
process.env.HTTP_PROXY = null;
|
process.env.HTTP_PROXY = null;
|
||||||
|
@ -42,7 +42,7 @@ if (hf.config.proxy) {
|
||||||
},
|
},
|
||||||
configurable: true,
|
configurable: true,
|
||||||
});
|
});
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// https://stackoverflow.com/a/12646864 § "Updating to ES6 / ECMAScript 2015"
|
// https://stackoverflow.com/a/12646864 § "Updating to ES6 / ECMAScript 2015"
|
||||||
function shuffleArray(array) {
|
function shuffleArray(array) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue