This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from moonstar-x/djs-extended
Version 4.0.0
- Loading branch information
Showing
58 changed files
with
2,631 additions
and
19,629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
# OS Generated | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Thrashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# IDE | ||
.vscode/ | ||
.idea/ | ||
|
||
# Node | ||
node_modules | ||
npm-debug.log | ||
|
||
# Development | ||
config/settings.json | ||
.github | ||
.git | ||
data/local-music/ | ||
dev-data | ||
|
||
# Tests | ||
__mocks__ | ||
test | ||
build | ||
|
||
# Git | ||
.github | ||
.git | ||
|
||
# Root files | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
jest.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
node_modules | ||
build | ||
old | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
"parserOptions": { | ||
"ecmaVersion": 2020 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master, rework] | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -19,10 +19,7 @@ jobs: | |
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Update git global URL | ||
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]/ | ||
node-version: 12.x | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
@@ -44,4 +41,4 @@ jobs: | |
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
event-type: docker-build | ||
event-type: docker-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ build | |
# Audio Files | ||
*.mp3 | ||
*.m4a | ||
|
||
# Dev Data | ||
dev-data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,3 @@ | ||
# Build Stage | ||
FROM node:12.20.0-alpine3.12 AS build | ||
|
||
RUN apk add --no-cache git | ||
RUN git config --global url."https://github.com/".insteadOf ssh://[email protected]/ | ||
|
||
WORKDIR /opt/app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
# Bot Image | ||
FROM node:12.20.0-alpine3.12 | ||
|
||
ARG DATE_CREATED | ||
|
@@ -28,32 +11,14 @@ LABEL org.opencontainers.image.title="Discord Music 24/7" | |
LABEL org.opencontainers.image.description="A 24/7 music bot for Discord that pauses when nobody is listening." | ||
LABEL org.opencontainers.image.source="https://github.com/moonstar-x/discord-music-24-7" | ||
|
||
RUN apk add --no-cache ffmpeg git | ||
RUN git config --global url."https://github.com/".insteadOf ssh://[email protected]/ | ||
RUN apk add --no-cache ffmpeg | ||
|
||
WORKDIR /opt/app | ||
|
||
COPY package*.json ./LICENSE ./README.md ./ | ||
COPY package*.json ./ | ||
|
||
RUN npm ci --only=prod | ||
|
||
COPY ./config ./config | ||
COPY ./data ./data | ||
|
||
# These are added here as a way to define which env variables will be used. | ||
ENV DISCORD_TOKEN "" | ||
ENV PREFIX "" | ||
ENV OWNER_ID "" | ||
ENV PRESENCE_TYPE "" | ||
ENV CHANNEL_ID "" | ||
ENV SOUNDCLOUD_CLIENT_ID "" | ||
ENV YOUTUBE_COOKIE "" | ||
ENV SHUFFLE "" | ||
ENV PAUSE_ON_EMPTY "" | ||
ENV CHANNEL_LEAVE_ON_EMPTY "" | ||
|
||
COPY --from=build /opt/app/build ./build | ||
|
||
VOLUME /opt/app/data /opt/app/config | ||
COPY . . | ||
|
||
CMD ["npm", "start"] | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import { Readable } from 'stream'; | ||
const { Readable } = require('stream'); | ||
|
||
const infoMock = { | ||
videoDetails: { | ||
title: 'video title' | ||
} | ||
}; | ||
|
||
export default { | ||
module.exports = { | ||
getInfo: jest.fn((url, options) => Promise.resolve(infoMock)), | ||
downloadFromInfo: jest.fn((url, options) => new Readable()) | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"discord_token": "", | ||
"token": "", | ||
"prefix": "!", | ||
"owner_id": "", | ||
"presence_type": "PLAYING", | ||
"channel_id": "", | ||
"shuffle": true, | ||
"pause_on_empty": true, | ||
"channel_leave_on_empty": false, | ||
"owner_reporting": false, | ||
"soundcloud_client_id": "", | ||
"youtube_cookie": "" | ||
} |
Oops, something went wrong.