Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!327
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
FROM node:22.13.1-alpine3.21 AS base
|
FROM node:22.13.1-alpine3.21 AS base
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN corepack enable pnpm && npm install -g corepack@latest
|
||||||
COPY . /app
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
FROM base AS prod-deps
|
FROM base AS prod-deps
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||||
|
|||||||
47
package.json
47
package.json
@@ -37,43 +37,42 @@
|
|||||||
"author": "Taken",
|
"author": "Taken",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discord-player/extractor": "^4.5.1",
|
"@discord-player/extractor": "^7.1.0",
|
||||||
"@evan/opus": "^1.0.3",
|
|
||||||
"@swc/cli": "^0.6.0",
|
"@swc/cli": "^0.6.0",
|
||||||
"@swc/core": "^1.10.11",
|
"@swc/core": "^1.11.5",
|
||||||
"anilist": "^0.12.4",
|
"anilist": "^0.12.4",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.8.1",
|
||||||
"chalk": "^5.4.1",
|
"chalk": "^5.4.1",
|
||||||
"cron": "^3.5.0",
|
"cron": "^4.1.0",
|
||||||
"discord-player": "^6.7.1",
|
"discord-player": "^7.1.0",
|
||||||
"discord-player-youtubei": "^1.4.2",
|
"discord.js": "^14.18.0",
|
||||||
"discord.js": "^14.17.3",
|
"drizzle-orm": "^0.40.0",
|
||||||
"drizzle-orm": "^0.39.0",
|
"ioredis": "^5.5.0",
|
||||||
"ioredis": "^5.4.2",
|
"mediaplex": "^1.0.0",
|
||||||
"ms": "^2.1.3",
|
"ms": "^2.1.3",
|
||||||
"postgres": "^3.4.5",
|
"postgres": "^3.4.5",
|
||||||
"pretty-ms": "^9.2.0",
|
"pretty-ms": "^9.2.0",
|
||||||
"zod": "^3.24.1"
|
"zod": "^3.24.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/eslintrc": "^3.2.0",
|
"@eslint/eslintrc": "^3.3.0",
|
||||||
"@eslint/js": "^9.19.0",
|
"@eslint/js": "^9.21.0",
|
||||||
"@types/ms": "^0.7.34",
|
"@types/ms": "^2.1.0",
|
||||||
"@types/node": "^22.12.0",
|
"@types/node": "^22.13.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||||
"@typescript-eslint/parser": "^8.22.0",
|
"@typescript-eslint/parser": "^8.25.0",
|
||||||
"chokidar": "^4.0.3",
|
"chokidar": "^4.0.3",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"dprint": "^0.48.0",
|
"dprint": "^0.49.0",
|
||||||
"drizzle-kit": "^0.30.3",
|
"drizzle-kit": "^0.30.5",
|
||||||
"eslint": "^9.19.0",
|
"eslint": "^9.21.0",
|
||||||
"eslint-plugin-drizzle": "^0.2.3",
|
"eslint-plugin-drizzle": "^0.2.3",
|
||||||
"globals": "^15.14.0",
|
"globals": "^16.0.0",
|
||||||
"nodemon": "^3.1.9",
|
"nodemon": "^3.1.9",
|
||||||
"tsx": "^4.19.2",
|
"tsx": "^4.19.3",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.8.2"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.15.4",
|
"packageManager": "pnpm@9.15.6",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"whatwg-url@5.0.0": "patches/whatwg-url@5.0.0.patch",
|
"whatwg-url@5.0.0": "patches/whatwg-url@5.0.0.patch",
|
||||||
|
|||||||
1890
pnpm-lock.yaml
generated
1890
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -20,9 +20,10 @@ const cmd: SubCommand = async (interaction) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (amount > queue.size) {
|
if (amount > queue.size) {
|
||||||
|
queue.delete()
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: `There are only ${queue.size} song${queue.size === 1 ? "" : "s"} in the queue`,
|
description: "Skipped all songs in the queue",
|
||||||
color: embedColor
|
color: embedColor
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -19,9 +19,11 @@ export default {
|
|||||||
|
|
||||||
const player = useMainPlayer()
|
const player = useMainPlayer()
|
||||||
const { tracks } = await player.search(focusedOption.value, {
|
const { tracks } = await player.search(focusedOption.value, {
|
||||||
searchEngine: QueryType.YOUTUBE_SEARCH
|
searchEngine: QueryType.SPOTIFY_SEARCH
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(tracks)
|
||||||
|
|
||||||
const results = tracks.map(track => ({
|
const results = tracks.map(track => ({
|
||||||
name: `${track.title.slice(0, 20)} [${track.author}]`,
|
name: `${track.title.slice(0, 20)} [${track.author}]`,
|
||||||
value: track.url
|
value: track.url
|
||||||
|
|||||||
@@ -11,13 +11,9 @@ export default async function loadCronEvents(ft: FileType) {
|
|||||||
for (const file of cronFiles) {
|
for (const file of cronFiles) {
|
||||||
const filePath = path.join(cronPath, file)
|
const filePath = path.join(cronPath, file)
|
||||||
const { default: cron } = await import("file://" + filePath) as { default: ICron }
|
const { default: cron } = await import("file://" + filePath) as { default: ICron }
|
||||||
|
const { seconds, minutes, hours, dayOfMonth, month, dayOfWeek } = cron.time
|
||||||
|
|
||||||
const time = cron.time.seconds + " " +
|
const time = `${seconds} ${minutes} ${hours} ${dayOfMonth} ${month} ${dayOfWeek}`
|
||||||
cron.time.minutes + " " +
|
|
||||||
cron.time.hours + " " +
|
|
||||||
cron.time.dayOfMonth + " " +
|
|
||||||
cron.time.month + " " +
|
|
||||||
cron.time.dayOfWeek
|
|
||||||
|
|
||||||
new CronJob(time, cron.execute, cron.onComplete, cron.start, cron.timeZone).start()
|
new CronJob(time, cron.execute, cron.onComplete, cron.start, cron.timeZone).start()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { DefaultExtractors } from "@discord-player/extractor"
|
||||||
import { Player } from "discord-player"
|
import { Player } from "discord-player"
|
||||||
import { YoutubeiExtractor } from "discord-player-youtubei"
|
|
||||||
import { Redis } from "ioredis"
|
import { Redis } from "ioredis"
|
||||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||||
import env from "~/utils/Env.js"
|
import env from "~/utils/Env.js"
|
||||||
@@ -20,9 +20,7 @@ if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT === "true") {
|
|||||||
class Illegitimate {
|
class Illegitimate {
|
||||||
async start() {
|
async start() {
|
||||||
await loadAllEvents(client, ft)
|
await loadAllEvents(client, ft)
|
||||||
// await player.extractors.loadDefault()
|
await player.extractors.loadMulti(DefaultExtractors)
|
||||||
await player.extractors.loadDefault(ext => ext != "YouTubeExtractor")
|
|
||||||
await player.extractors.register(YoutubeiExtractor, {})
|
|
||||||
await client.start()
|
await client.start()
|
||||||
await this.databases()
|
await this.databases()
|
||||||
this.loadMethods()
|
this.loadMethods()
|
||||||
|
|||||||
Reference in New Issue
Block a user