Skip to content

Commit

Permalink
3.5.0
Browse files Browse the repository at this point in the history
* 3.5.0-dev-0
Refactored database code.
Returned prefixes for text command in /help command
Fixed bug when command /playfile are bypass queue limits.
Fixed bug when bot leaving guild, the guild settings are not deleted.

* 3.5.0-dev-1
Saving data to a database now works correctly.
Added 24/7 mode to player and command /247.
Command /help now displays prefixes.
Renaming of audioplayer components.

* 3.5.0-dev-2
Changed GitHub Action for linters, to run ESLint and Prettier in parallel.
Linters fix to pass code quality test.
Little fix in setLeaveOnEmpty in PlayerInstance.ts

* 3.5.0-dev-3
Added a text to wiki about command /247

* 3.5.0-dev-4
Removed song history and voice status fields from guild schema.
Renaming of player components.
  • Loading branch information
AlexInCube authored Aug 6, 2024
1 parent c4cbd2a commit 27fa04e
Show file tree
Hide file tree
Showing 42 changed files with 837 additions and 653 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: ['**']

jobs:
linters:
name: Run Linters
prettier:
name: Run Prettier
runs-on: ubuntu-latest

steps:
Expand All @@ -32,5 +32,27 @@ jobs:
- name: Run Prettier
run: pnpm run prettier:check

eslint:
name: Run ESLint
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run ESLint
run: pnpm run eslint
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.r
...eslintConfigPrettier.rules,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'no-constant-binary-expression': 'off'
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aicbot",
"version": "3.4.0",
"version": "3.5.0",
"description": "Discord Bot for playing music",
"main": "build/main.js",
"scripts": {
Expand Down Expand Up @@ -29,7 +29,7 @@
"@distube/spotify": "^2.0.2",
"@distube/youtube": "^1.0.2",
"@distube/yt-dlp": "^2.0.1",
"@distube/ytdl-core": "^4.13.7",
"@distube/ytdl-core": "^4.14.1",
"@distube/ytsr": "^2.0.4",
"@eslint/js": "^9.8.0",
"cross-env": "7.0.3",
Expand All @@ -55,17 +55,16 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20.14.13",
"@types/node": "^20.14.14",
"@types/node-cron": "^3.0.11",
"@types/node-os-utils": "^1.3.4",
"@types/puppeteer": "^7.0.4",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.8.0",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript": "^5.5.4"
}
Expand Down
76 changes: 37 additions & 39 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/CommandTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ICommand {
bot_permissions: Array<PermissionResolvable>;
// Hidden from everything (disable slash_data property if true)
hidden?: boolean;
// Guild related data such as voice settings
// guild related data such as voice settings
guild_data?: IGuildData;
}

Expand Down
5 changes: 3 additions & 2 deletions src/Types.ts → src/DiscordTypes.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { Client, ClientEvents, Collection } from 'discord.js';
import { ICommand, ICommandGroup } from './CommandTypes.js';
import { AudioPlayerCore } from './audioplayer/AudioPlayerCore.js';
import { AudioPlayersManager } from './audioplayer/AudioPlayersManager.js';

declare module 'discord.js' {
export interface Client {
commands: Collection<string, ICommand>;
commandsGroups: Collection<string, ICommandGroup>;
audioPlayer: AudioPlayerCore;
audioPlayer: AudioPlayersManager;
}
}

export interface BotEvent {
name: keyof ClientEvents;
once?: boolean | false;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
execute: (client: Client, ...args: any) => void;
}
Loading

0 comments on commit 27fa04e

Please sign in to comment.