Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasB25 committed Sep 12, 2024
1 parent 539bd41 commit d44141c
Show file tree
Hide file tree
Showing 106 changed files with 7,668 additions and 7,612 deletions.
138 changes: 69 additions & 69 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"suspicious": {
"noConfusingVoidType": "off",
"noConsoleLog": "off",
"noEmptyBlockStatements": "off",
"noExplicitAny": "off",
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
"useAwait": "off"
},
"style": {
"noDefaultExport": "off",
"noInferrableTypes": "off",
"noNamespaceImport": "off",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useBlockStatements": "off",
"useFilenamingConvention": "off",
"useNamingConvention": "off",
"useNumberNamespace": "off",
"useSingleCaseStatement": "off"
},
"complexity": {
"noBannedTypes": "off",
"noForEach": "off",
"noStaticOnlyClass": "off",
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": {
"maxAllowedComplexity": 255
}
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"suspicious": {
"noConfusingVoidType": "off",
"noConsoleLog": "off",
"noEmptyBlockStatements": "off",
"noExplicitAny": "off",
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
"useAwait": "off"
},
"style": {
"noDefaultExport": "off",
"noInferrableTypes": "off",
"noNamespaceImport": "off",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useBlockStatements": "off",
"useFilenamingConvention": "off",
"useNamingConvention": "off",
"useNumberNamespace": "off",
"useSingleCaseStatement": "off"
},
"complexity": {
"noBannedTypes": "off",
"noForEach": "off",
"noStaticOnlyClass": "off",
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": {
"maxAllowedComplexity": 255
}
}
},
"security": {
"noGlobalEval": "off"
},
"correctness": {
"noNodejsModules": "off",
"noVoidTypeReturn": "off"
},
"performance": {
"noBarrelFile": "off"
}
}
},
"security": {
"noGlobalEval": "off"
},
"correctness": {
"noNodejsModules": "off",
"noVoidTypeReturn": "off"
},
"performance": {
"noBarrelFile": "off"
}
}
},
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "crlf",
"lineWidth": 140,
"formatWithErrors": true
},
"javascript": {
},
"formatter": {
"quoteStyle": "double",
"arrowParentheses": "always",
"bracketSameLine": true,
"semicolons": "always"
"enabled": true,
"indentWidth": 4,
"indentStyle": "space",
"lineEnding": "crlf",
"lineWidth": 140,
"formatWithErrors": true
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"arrowParentheses": "always",
"bracketSameLine": true,
"semicolons": "always"
}
},
"files": {
"ignoreUnknown": false,
"ignore": [".vscode", "dist", "locales", "node_modules"]
}
},
"files": {
"ignoreUnknown": false,
"ignore": [".vscode", "dist", "locales", "node_modules"]
}
}
110 changes: 55 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
{
"name": "lavamusic",
"version": "4.6.7",
"description": "LavaMusic is a music bot for Discord, written in JavaScript using the Discord.js, Typescript, Shoukaku (Lavalink) library.",
"main": "dist/index.js",
"type": "module",
"scripts": {
"start": "npm run clean && node .",
"db:push": "npx prisma db push",
"db:migrate": "npx prisma migrate dev --name init",
"build": "tsc --project tsconfig.json",
"clean": "node scripts/clean.js && npm run build",
"lint": "biome lint --write",
"format": "biome format --write"
},
"repository": {
"type": "git",
"url": "git+https://github.com/appujet/lavamusic.git"
},
"keywords": ["discord", "music", "bot", "lavalink", "shoukaku", "lavamusic", "typescript", "prisma"],
"author": "appujet",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/appujet/lavamusic/issues"
},
"homepage": "https://github.com/appujet/lavamusic#readme",
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/i18n": "^0.13.12",
"@types/node": "^22.5.4",
"@types/signale": "^1.4.7",
"prisma": "^5.19.1",
"typescript": "^5.6.2"
},
"dependencies": {
"@prisma/client": "^5.19.1",
"@top-gg/sdk": "^3.1.6",
"discord.js": "^14.16.1",
"dotenv": "^16.4.5",
"i18n": "^0.15.1",
"node-system-stats": "^1.3.0",
"shoukaku": "^4.1.1",
"signale": "^1.4.0",
"topgg-autoposter": "^2.0.2",
"tslib": "^2.7.0",
"undici": "^6.19.8"
},
"signale": {
"displayScope": true,
"displayBadge": true,
"displayDate": true,
"displayFilename": true,
"displayLabel": true,
"displayTimestamp": true,
"underlineLabel": true
}
"name": "lavamusic",
"version": "4.6.7",
"description": "LavaMusic is a music bot for Discord, written in JavaScript using the Discord.js, Typescript, Shoukaku (Lavalink) library.",
"main": "dist/index.js",
"type": "module",
"scripts": {
"start": "npm run clean && node .",
"db:push": "npx prisma db push",
"db:migrate": "npx prisma migrate dev --name init",
"build": "tsc --project tsconfig.json",
"clean": "node scripts/clean.js && npm run build",
"lint": "biome lint --write",
"format": "biome format --write"
},
"repository": {
"type": "git",
"url": "git+https://github.com/appujet/lavamusic.git"
},
"keywords": ["discord", "music", "bot", "lavalink", "shoukaku", "lavamusic", "typescript", "prisma"],
"author": "appujet",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/appujet/lavamusic/issues"
},
"homepage": "https://github.com/appujet/lavamusic#readme",
"devDependencies": {
"@biomejs/biome": "^1.9.0",
"@types/i18n": "^0.13.12",
"@types/node": "^22.5.4",
"@types/signale": "^1.4.7",
"prisma": "^5.19.1",
"typescript": "^5.6.2"
},
"dependencies": {
"@prisma/client": "^5.19.1",
"@top-gg/sdk": "^3.1.6",
"discord.js": "^14.16.2",
"dotenv": "^16.4.5",
"i18n": "^0.15.1",
"node-system-stats": "^1.3.0",
"shoukaku": "^4.1.1",
"signale": "^1.4.0",
"topgg-autoposter": "^2.0.2",
"tslib": "^2.7.0",
"undici": "^6.19.8"
},
"signale": {
"displayScope": true,
"displayBadge": true,
"displayDate": true,
"displayFilename": true,
"displayLabel": true,
"displayTimestamp": true,
"underlineLabel": true
}
}
16 changes: 8 additions & 8 deletions process.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"apps": [
{
"name": "lavamusic",
"script": "dist/index.js",
"node_args": ["--enable-source-maps"],
"restart_delay": 10000
}
]
"apps": [
{
"name": "lavamusic",
"script": "dist/index.js",
"node_args": ["--enable-source-maps"],
"restart_delay": 10000
}
]
}
16 changes: 8 additions & 8 deletions scripts/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { rm } from "node:fs/promises";
import { resolve } from "node:path";

async function clean() {
try {
const path = resolve("dist");
if (existsSync(path)) {
await rm(path, { recursive: true, force: true });
try {
const path = resolve("dist");
if (existsSync(path)) {
await rm(path, { recursive: true, force: true });
}
} catch (error) {
console.error("Error while cleaning dist folder:", error);
process.exit(1);
}
} catch (error) {
console.error("Error while cleaning dist folder:", error);
process.exit(1);
}
}

clean();
18 changes: 9 additions & 9 deletions scripts/restart.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { exec } from "node:child_process";

async function startLavamusic(): Promise<void> {
exec("npm start", (error, stderr) => {
if (error) {
console.error(`Error starting Lavamusic: ${error.message}`);
return;
}
if (stderr) {
console.error(`Error output: ${stderr}`);
}
});
exec("npm start", (error, stderr) => {
if (error) {
console.error(`Error starting Lavamusic: ${error.message}`);
return;
}
if (stderr) {
console.error(`Error output: ${stderr}`);
}
});
}

setTimeout(startLavamusic, 5000);
4 changes: 2 additions & 2 deletions src/LavaClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Lavamusic from "./structures/Lavamusic.js";
const { GuildMembers, MessageContent, GuildVoiceStates, GuildMessages, Guilds, GuildMessageTyping } = GatewayIntentBits;

const clientOptions: ClientOptions = {
intents: [Guilds, GuildMessages, MessageContent, GuildVoiceStates, GuildMembers, GuildMessageTyping],
allowedMentions: { parse: ["users", "roles"], repliedUser: false },
intents: [Guilds, GuildMessages, MessageContent, GuildVoiceStates, GuildMembers, GuildMessageTyping],
allowedMentions: { parse: ["users", "roles"], repliedUser: false },
};

const client = new Lavamusic(clientOptions);
Expand Down
Loading

0 comments on commit d44141c

Please sign in to comment.