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
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN corepack enable pnpm && npm install -g corepack@latest
|
||||
|
||||
FROM base AS prod-deps
|
||||
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",
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@discord-player/extractor": "^4.5.1",
|
||||
"@evan/opus": "^1.0.3",
|
||||
"@discord-player/extractor": "^7.1.0",
|
||||
"@swc/cli": "^0.6.0",
|
||||
"@swc/core": "^1.10.11",
|
||||
"@swc/core": "^1.11.5",
|
||||
"anilist": "^0.12.4",
|
||||
"axios": "^1.7.9",
|
||||
"axios": "^1.8.1",
|
||||
"chalk": "^5.4.1",
|
||||
"cron": "^3.5.0",
|
||||
"discord-player": "^6.7.1",
|
||||
"discord-player-youtubei": "^1.4.2",
|
||||
"discord.js": "^14.17.3",
|
||||
"drizzle-orm": "^0.39.0",
|
||||
"ioredis": "^5.4.2",
|
||||
"cron": "^4.1.0",
|
||||
"discord-player": "^7.1.0",
|
||||
"discord.js": "^14.18.0",
|
||||
"drizzle-orm": "^0.40.0",
|
||||
"ioredis": "^5.5.0",
|
||||
"mediaplex": "^1.0.0",
|
||||
"ms": "^2.1.3",
|
||||
"postgres": "^3.4.5",
|
||||
"pretty-ms": "^9.2.0",
|
||||
"zod": "^3.24.1"
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.2.0",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@types/ms": "^0.7.34",
|
||||
"@types/node": "^22.12.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
||||
"@typescript-eslint/parser": "^8.22.0",
|
||||
"@eslint/eslintrc": "^3.3.0",
|
||||
"@eslint/js": "^9.21.0",
|
||||
"@types/ms": "^2.1.0",
|
||||
"@types/node": "^22.13.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
||||
"@typescript-eslint/parser": "^8.25.0",
|
||||
"chokidar": "^4.0.3",
|
||||
"dotenv": "^16.4.7",
|
||||
"dprint": "^0.48.0",
|
||||
"drizzle-kit": "^0.30.3",
|
||||
"eslint": "^9.19.0",
|
||||
"dprint": "^0.49.0",
|
||||
"drizzle-kit": "^0.30.5",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-plugin-drizzle": "^0.2.3",
|
||||
"globals": "^15.14.0",
|
||||
"globals": "^16.0.0",
|
||||
"nodemon": "^3.1.9",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.3"
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
"packageManager": "pnpm@9.15.4",
|
||||
"packageManager": "pnpm@9.15.6",
|
||||
"pnpm": {
|
||||
"patchedDependencies": {
|
||||
"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) {
|
||||
queue.delete()
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: `There are only ${queue.size} song${queue.size === 1 ? "" : "s"} in the queue`,
|
||||
description: "Skipped all songs in the queue",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -19,9 +19,11 @@ export default {
|
||||
|
||||
const player = useMainPlayer()
|
||||
const { tracks } = await player.search(focusedOption.value, {
|
||||
searchEngine: QueryType.YOUTUBE_SEARCH
|
||||
searchEngine: QueryType.SPOTIFY_SEARCH
|
||||
})
|
||||
|
||||
console.log(tracks)
|
||||
|
||||
const results = tracks.map(track => ({
|
||||
name: `${track.title.slice(0, 20)} [${track.author}]`,
|
||||
value: track.url
|
||||
|
||||
@@ -11,13 +11,9 @@ export default async function loadCronEvents(ft: FileType) {
|
||||
for (const file of cronFiles) {
|
||||
const filePath = path.join(cronPath, file)
|
||||
const { default: cron } = await import("file://" + filePath) as { default: ICron }
|
||||
const { seconds, minutes, hours, dayOfMonth, month, dayOfWeek } = cron.time
|
||||
|
||||
const time = cron.time.seconds + " " +
|
||||
cron.time.minutes + " " +
|
||||
cron.time.hours + " " +
|
||||
cron.time.dayOfMonth + " " +
|
||||
cron.time.month + " " +
|
||||
cron.time.dayOfWeek
|
||||
const time = `${seconds} ${minutes} ${hours} ${dayOfMonth} ${month} ${dayOfWeek}`
|
||||
|
||||
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 { YoutubeiExtractor } from "discord-player-youtubei"
|
||||
import { Redis } from "ioredis"
|
||||
import { ExtendedClient as Client } from "~/utils/Client.js"
|
||||
import env from "~/utils/Env.js"
|
||||
@@ -20,9 +20,7 @@ if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT === "true") {
|
||||
class Illegitimate {
|
||||
async start() {
|
||||
await loadAllEvents(client, ft)
|
||||
// await player.extractors.loadDefault()
|
||||
await player.extractors.loadDefault(ext => ext != "YouTubeExtractor")
|
||||
await player.extractors.register(YoutubeiExtractor, {})
|
||||
await player.extractors.loadMulti(DefaultExtractors)
|
||||
await client.start()
|
||||
await this.databases()
|
||||
this.loadMethods()
|
||||
|
||||
Reference in New Issue
Block a user