Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Sep 24, 2024
1 parent 73d6aa1 commit 9ad0791
Show file tree
Hide file tree
Showing 121 changed files with 7,902 additions and 7,704 deletions.
6 changes: 6 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": ["development"],
"hints": {
"typescript-config/consistent-casing": "off"
}
}
169 changes: 83 additions & 86 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,88 +1,85 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"complexity": {
"noBannedTypes": "off",
"noExcessiveCognitiveComplexity": "off",
"noForEach": "off",
"noStaticOnlyClass": "off"
},
"correctness": {
"noNodejsModules": "off",
"noUnusedFunctionParameters": "off",
"noUnusedVariables": "off",
"noVoidTypeReturn": "off",
"useImportExtensions": "off"
},
"performance": {
"noBarrelFile": "off",
"useTopLevelRegex": "off"
},
"security": {
"noGlobalEval": "off"
},
"style": {
"noDefaultExport": "off",
"noInferrableTypes": "off",
"noNamespaceImport": "off",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useBlockStatements": "off",
"useDefaultSwitchClause": "off",
"useFilenamingConvention": "off",
"useImportType": "warn",
"useNamingConvention": "off",
"useNumberNamespace": "off",
"useSingleCaseStatement": "off"
},
"suspicious": {
"noConfusingVoidType": "off",
"noConsole": "off",
"noConsoleLog": "off",
"noEmptyBlockStatements": "off",
"noEvolvingTypes": "off",
"noExplicitAny": "off",
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
"useAwait": "off"
}
}
},
"formatter": {
"enabled": true,
"indentWidth": 4,
"indentStyle": "space",
"lineEnding": "crlf",
"lineWidth": 140,
"formatWithErrors": true
},
"json": {
"linter": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentWidth": 2,
"lineEnding": "crlf",
"lineWidth": 80
}
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"arrowParentheses": "always",
"bracketSameLine": true,
"semicolons": "always"
}
},
"files": {
"ignoreUnknown": false,
"ignore": [".vscode", "dist", "locales", "node_modules"]
}
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": true,
"ignore": ["node_modules/", "dist", "package.json", "tsconfig.json", ".vscode"]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 120,
"lineEnding": "crlf",
"formatWithErrors": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"all": true,
"security": {
"noGlobalEval": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noAssignInExpressions": "off",
"useAwait": "off",
"noConfusingVoidType": "off",
"noAsyncPromiseExecutor": "off",
"noUnsafeDeclarationMerging": "off",
"noEmptyInterface": "off",
"noThenProperty": "off"
},
"correctness": {
"noNodejsModules": "off",
"useImportExtensions": "off",
"noUnusedFunctionParameters": "off",
"noUnusedVariables": "off"
},
"style": {
"noDefaultExport": "off",
"useBlockStatements": "off",
"noParameterProperties": "off",
"useNamingConvention": "off",
"noNonNullAssertion": "off",
"useForOf": "off",
"useDefaultSwitchClause": "off",
"noParameterAssign": "off",
"useFilenamingConvention": "off",
"useEnumInitializers": "off",
"useExplicitLengthCheck": "off",
"noNamespaceImport": "off",
"noInferrableTypes": "info"
},
"complexity": {
"noForEach": "off",
"noExcessiveCognitiveComplexity": "off",
"noUselessConstructor": "off",
"noBannedTypes": "off"
},
"performance": {
"noBarrelFile": "off",
"noDelete": "off",
"noReExportAll": "off",
"useTopLevelRegex": "off"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"arrowParentheses": "asNeeded",
"bracketSameLine": true
}
}
}
2 changes: 1 addition & 1 deletion locales/ChineseCN.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "离开服务器",
"List all guilds the bot is in": "列出机器人所在的所有服务器",
"Restart the bot": "重启机器人"
}
}
2 changes: 1 addition & 1 deletion locales/ChineseTW.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "離開伺服器",
"List all guilds the bot is in": "列出機器人所在的所有伺服器",
"Restart the bot": "重啟機器人"
}
}
2 changes: 1 addition & 1 deletion locales/EnglishUS.json
Original file line number Diff line number Diff line change
Expand Up @@ -644,4 +644,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/French.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/German.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/Hindi.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/Indonesian.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Tinggalkan server",
"List all guilds the bot is in": "Daftar semua server tempat bot berada",
"Restart the bot": "Restart bot"
}
}
2 changes: 1 addition & 1 deletion locales/Japanese.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "ギルドを離れる",
"List all guilds the bot is in": "ボットが所属しているすべてのギルドを一覧表示",
"Restart the bot": "ボットを再起動"
}
}
2 changes: 1 addition & 1 deletion locales/Korean.json
Original file line number Diff line number Diff line change
Expand Up @@ -644,4 +644,4 @@
"Leave a guild": "서버를 떠나요",
"List all guilds the bot is in": "봇이 들어가 있는 서버를 알려줘요",
"Restart the bot": "봇을 재시작해요"
}
}
2 changes: 1 addition & 1 deletion locales/Norwegian.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Forlat en server",
"List all guilds the bot is in": "List opp alle servere boten er på",
"Restart the bot": "Start boten på nytt"
}
}
2 changes: 1 addition & 1 deletion locales/Polish.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Opusć serwer",
"List all guilds the bot is in": "Lista wszystkich serwerów, w których jest bot",
"Restart the bot": "Uruchom ponownie bota"
}
}
2 changes: 1 addition & 1 deletion locales/PortuguesePT.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,4 +622,4 @@
"no_music_playing": "Nada está a ser reproduzido neste momento."
}
}
}
}
2 changes: 1 addition & 1 deletion locales/Russian.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/SpanishES.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Leave a guild",
"List all guilds the bot is in": "List all guilds the bot is in",
"Restart the bot": "Restart the bot"
}
}
2 changes: 1 addition & 1 deletion locales/Vietnamese.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,4 +632,4 @@
"Leave a guild": "Rời khỏi một guild",
"List all guilds the bot is in": "Danh sách tất cả guild mà bot đang ở",
"Restart the bot": "Khởi động lại bot"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"dotenv": "^16.4.5",
"genius-lyrics-api": "^3.2.1",
"i18n": "^0.15.1",
"lavalink-client": "https://pkg.pr.new/moe-music/lavalink-client@0b0f590",
"lavalink-client": "https://pkg.pr.new/moe-music/lavalink-client@1c1f8f3",
"node-system-stats": "^1.3.0",
"signale": "^1.4.0",
"topgg-autoposter": "^2.0.2",
Expand Down
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
}
]
}
24 changes: 12 additions & 12 deletions scripts/clean.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const fs = require("node:fs");
const { rm } = require("node:fs").promises;
const path = require("node:path");
const fs = require('node:fs');
const { rm } = require('node:fs').promises;
const path = require('node:path');

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

clean();
Expand Down
20 changes: 10 additions & 10 deletions scripts/restart.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const { exec } = require("node:child_process");
const { exec } = require('node:child_process');

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

setTimeout(startLavamusic, 5000);
Expand Down
10 changes: 5 additions & 5 deletions src/LavaClient.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { type ClientOptions, GatewayIntentBits } from "discord.js";
import { env } from "./env";
import Lavamusic from "./structures/Lavamusic";
import { type ClientOptions, GatewayIntentBits } from 'discord.js';
import { env } from './env';
import Lavamusic from './structures/Lavamusic';

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 9ad0791

Please sign in to comment.