Skip to content

Commit

Permalink
fix(deps): update dependency discord-player to v6 (#338)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [discord-player](https://discord-player.js.org)
([source](https://togithub.com/Androz2091/discord-player)) | [`^5.4.0`
->
`^6.6.1`](https://renovatebot.com/diffs/npm/discord-player/5.4.0/6.6.1)
|
[![age](https://badges.renovateapi.com/packages/npm/discord-player/6.6.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/discord-player/6.6.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/discord-player/6.6.1/compatibility-slim/5.4.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/discord-player/6.6.1/confidence-slim/5.4.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Androz2091/discord-player (discord-player)</summary>

###
[`v6.6.1`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.6.1)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.6.0...discord-player@6.6.1)

#### What's Changed

- docs(resource): update flowease's discord-player version in
showcase.ts by [@&#8203;Lutra-Fs](https://togithub.com/Lutra-Fs) in
[Androz2091/discord-player#1755
- Fix typo for userVoiceChannel in the documention by
[@&#8203;L0SER8228](https://togithub.com/L0SER8228) in
[Androz2091/discord-player#1756
- createProgressBar options by
[@&#8203;chimnayajith](https://togithub.com/chimnayajith) in
[Androz2091/discord-player#1757
- feat: introduce BridgeSource by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1760

#### New Contributors

- [@&#8203;Lutra-Fs](https://togithub.com/Lutra-Fs) made their first
contribution in
[Androz2091/discord-player#1755
- [@&#8203;chimnayajith](https://togithub.com/chimnayajith) made their
first contribution in
[Androz2091/discord-player#1757

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/[@&#8203;discord-player/equalizer](https://togithub.com/discord-player/equalizer)[@&#8203;0](https://togithub.com/0).2.2...discord-player@6.6.1

###
[`v6.6.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.6.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.5.0...discord-player@6.6.0)

#### What's Changed

- docs(resources): add Mirasaki Music Bot by
[@&#8203;Mirasaki](https://togithub.com/Mirasaki) in
[Androz2091/discord-player#1745
- Bump community resource version by
[@&#8203;Mirasaki](https://togithub.com/Mirasaki) in
[Androz2091/discord-player#1748
- 📝 Fix broken URL in document by
[@&#8203;GreenScreen410](https://togithub.com/GreenScreen410) in
[Androz2091/discord-player#1752
- refactor: website rewrite by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1753
-   feat: `channelPopulate` and friends

#### New Contributors

- [@&#8203;Mirasaki](https://togithub.com/Mirasaki) made their first
contribution in
[Androz2091/discord-player#1745

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/[@&#8203;discord-player/extractor](https://togithub.com/discord-player/extractor)[@&#8203;4](https://togithub.com/4).3.1...discord-player@6.6.0

###
[`v6.5.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.5.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.4.0...discord-player@6.5.0)

### Changelog

- fix(QueryResolver): spotify playlists were treated as youtube
playlists
-   feat(GuildQueueEvents): add `willPlayTrack` event
- types(GuildQueueEvent): make events constant usable in event listener
-   feat(GuildQueue): expose `maxSize` and `maxHistorySize`
-   feat(GuildQueue): add `options.preferBridgedMetadata`
-   fix(Track): resolve `null` upon metadata query failure
-   feat(GuildQueuePlayerNode): add `.totalDuration` getter
-   feat(GuildQueuePlayerNode): implement `StreamConfig`

##### Example of `willPlayTrack` event

```ts
// listening to this event pauses discord-player's execution process until `done()` is invoked
player.events.on(GuildQueueEvent.willPlayTrack, (queue, track, config, done) => {
    // set volume to 30%
    config.dispatcherConfig.volume = 30;

    // seek to 20 seconds before playing
    config.playerConfig.seek = 20;
    
    // tell discord-player to resume execution process
    return done();
});
```

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/[@&#8203;discord-player/extractor](https://togithub.com/discord-player/extractor)[@&#8203;4](https://togithub.com/4).3.0...discord-player@6.5.0

###
[`v6.4.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.4.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.3.1...discord-player@6.4.0)

#### What's Changed

-   feat: track metadata api
-   fix: spotify regex
-   feat: bridge query resolver
-   feat: track metadata api
-   feat: introduce play method on tracks and queues
-   feat: allow audio player options on play method
-   feat: error codes
- Update my community bot version and description by
[@&#8203;L0SER8228](https://togithub.com/L0SER8228) in
[Androz2091/discord-player#1742

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/discord-player@6.3.1...discord-player@6.4.0

###
[`v6.3.1`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.3.1)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.3.0...discord-player@6.3.1)

#### What's Changed

-   fix(FFmpeg): unexpected error from ffmpeg locator
- feat(PlayerInitOptions): add `useFFmpegLegacy` option to utilize
`prism-media`'s ffmpeg
- Update community bot Music-Disc version by
[@&#8203;hmes98318](https://togithub.com/hmes98318) in
[Androz2091/discord-player#1737
- Added my bot by [@&#8203;L0SER8228](https://togithub.com/L0SER8228) in
[Androz2091/discord-player#1739

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/[@&#8203;discord-player/extractor](https://togithub.com/discord-player/extractor)[@&#8203;4](https://togithub.com/4).2.2...discord-player@6.3.1

###
[`v6.3.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.3.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.2.1...discord-player@6.3.0)

#### What's Changed

- feat: add custom ffmpeg implementation (supporting more ffmpeg
binaries)
-   fix: proper validation for leaveOnEnd
- fix(Player): set query cache properly by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1721
- Update Docs to reflect autoRegisterExtractor depreciation by
[@&#8203;febkosq8](https://togithub.com/febkosq8) in
[Androz2091/discord-player#1722
- feat: implement custom ffmpeg stream by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1723
- \[DOCS-FIX] Update version of community bot by
[@&#8203;Mittelblut9](https://togithub.com/Mittelblut9) in
[Androz2091/discord-player#1720
- docs: update version botanique by
[@&#8203;Mylloon](https://togithub.com/Mylloon) in
[Androz2091/discord-player#1724
- docs: add wego overseer to community resources by
[@&#8203;rickklaasboer](https://togithub.com/rickklaasboer) in
[Androz2091/discord-player#1727

#### New Contributors

- [@&#8203;Mittelblut9](https://togithub.com/Mittelblut9) made their
first contribution in
[Androz2091/discord-player#1720
- [@&#8203;Mylloon](https://togithub.com/Mylloon) made their first
contribution in
[Androz2091/discord-player#1724
- [@&#8203;rickklaasboer](https://togithub.com/rickklaasboer) made their
first contribution in
[Androz2091/discord-player#1727

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/discord-player@6.2.1...discord-player@6.3.0

###
[`v6.2.1`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.2.1)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.2.0...discord-player@6.2.1)

### Changelog

-   fix esm build

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/discord-player@6.2.0...discord-player@6.2.1

###
[`v6.2.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.2.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.1.1...discord-player@6.2.0)

#### What's Changed

- Add `interaction.guild` for player.nodes.create by
[@&#8203;TapsHTS](https://togithub.com/TapsHTS) in
[Androz2091/discord-player#1689
- Add fullTitle property to LyricsExtractor by
[@&#8203;Crocross](https://togithub.com/Crocross) in
[Androz2091/discord-player#1690
- Add Beat-Bot to community bots by
[@&#8203;IslandRhythms](https://togithub.com/IslandRhythms) in
[Androz2091/discord-player#1701
- update references of 'karasu-music-bot' to 'auricle-music-bot' by
[@&#8203;itsauric](https://togithub.com/itsauric) in
[Androz2091/discord-player#1703
- Add Melody to community resources docs page by
[@&#8203;NerdyTechy](https://togithub.com/NerdyTechy) in
[Androz2091/discord-player#1704
- Update community bot Music-disc module version by
[@&#8203;hmes98318](https://togithub.com/hmes98318) in
[Androz2091/discord-player#1711
- added link to DumBot within community resources by
[@&#8203;Mateo-Wallace](https://togithub.com/Mateo-Wallace) in
[Androz2091/discord-player#1714
- docs: use yarn in installation examples by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1712
- feat(ExtractorExecutionContext): infer ext initialization options by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1716
- Remove extractors peer dependencies by
[@&#8203;NotGhex](https://togithub.com/NotGhex) in
[Androz2091/discord-player#1718

#### New Contributors

- [@&#8203;TapsHTS](https://togithub.com/TapsHTS) made their first
contribution in
[Androz2091/discord-player#1689
- [@&#8203;IslandRhythms](https://togithub.com/IslandRhythms) made their
first contribution in
[Androz2091/discord-player#1701
- [@&#8203;hmes98318](https://togithub.com/hmes98318) made their first
contribution in
[Androz2091/discord-player#1711
- [@&#8203;Mateo-Wallace](https://togithub.com/Mateo-Wallace) made their
first contribution in
[Androz2091/discord-player#1714

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/discord-player@6.1.1...discord-player@6.2.0

###
[`v6.1.1`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.1.1)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/discord-player@6.1.0...discord-player@6.1.1)

#### What's Changed

- Docs : Added new pages for actions, events & hooks by
[@&#8203;febkosq8](https://togithub.com/febkosq8) in
[Androz2091/discord-player#1676
- refactor(karasu): setup, commands and listeners by
[@&#8203;itsauric](https://togithub.com/itsauric) in
[Androz2091/discord-player#1686
-   feat(GuildQueue): move, copy, swap
-   feat(QueryType): add AUTO_SEARCH type
-   refactor(QueryResolver): set fallback query to AUTO_SEARCH
-   refactor(ExtractorExecutionContext): unprioritize youtube extractor

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/discord-player@6.1.0...discord-player@6.1.1

###
[`v6.1.0`](https://togithub.com/Androz2091/discord-player/releases/tag/discord-player%406.1.0)

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/v6.0.0...discord-player@6.1.0)

#### Changelog

-   fix: use appropriate source for autoplay
-   feat: add initialization options for extractors
-   fix: apply requestedBy on search results if available
-   feat: add extractor events
- docs: update music bot status by
[@&#8203;Nonolanlan1007](https://togithub.com/Nonolanlan1007) in
[Androz2091/discord-player#1646
- fix(GuildQueuePlayerNode): patch seek method by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1652
- Fix declaration file not found by
[@&#8203;NotGhex](https://togithub.com/NotGhex) in
[Androz2091/discord-player#1647
- fix(GuildQueuePlayerNode): fix stream error by
[@&#8203;Abish-x-lethal](https://togithub.com/Abish-x-lethal) in
[Androz2091/discord-player#1654
- Update docs for AutoComplete and minor changes by
[@&#8203;febkosq8](https://togithub.com/febkosq8) in
[Androz2091/discord-player#1674

#### New Contributors

- [@&#8203;Nonolanlan1007](https://togithub.com/Nonolanlan1007) made
their first contribution in
[Androz2091/discord-player#1646
- [@&#8203;NotGhex](https://togithub.com/NotGhex) made their first
contribution in
[Androz2091/discord-player#1647
- [@&#8203;Abish-x-lethal](https://togithub.com/Abish-x-lethal) made
their first contribution in
[Androz2091/discord-player#1654
- [@&#8203;febkosq8](https://togithub.com/febkosq8) made their first
contribution in
[Androz2091/discord-player#1674

**Full Changelog**:
https://github.com/Androz2091/discord-player/compare/v6.0.0...discord-player@6.1.0

###
[`v6.0.0`](https://togithub.com/Androz2091/discord-player/releases/tag/v6.0.0):
6.0.0

[Compare
Source](https://togithub.com/Androz2091/discord-player/compare/v5.4.0...v6.0.0)

### BREAKING CHANGES!!

> ⚠️ \[`semver:major`] This release contains breaking changes, making
old codes unusable.

Documentation: https://discord-player.js.org
Migration Guide: https://discord-player.js.org/docs/guides/v6-migration

#### What's Changed

- chore: monorepo setup by [@&#8203;skdhg](https://togithub.com/skdhg)
in
[Androz2091/discord-player#1510
- fix(StreamDispatcher): make paused property a getter by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1517
- feat: new docs website by [@&#8203;skdhg](https://togithub.com/skdhg)
in
[Androz2091/discord-player#1530
- Add 'karasu-music-bot' to examples in README.md by
[@&#8203;itsauric](https://togithub.com/itsauric) in
[Androz2091/discord-player#1552
- feat(QueryResolver): apple music user playlists by
[@&#8203;BasboBibbins](https://togithub.com/BasboBibbins) in
[Androz2091/discord-player#1580
- refactor: example commands by
[@&#8203;itsauric](https://togithub.com/itsauric) in
[Androz2091/discord-player#1590
- feat(GuildQueue): add size getter by
[@&#8203;Crocross](https://togithub.com/Crocross) in
[Androz2091/discord-player#1606
- refactor(karasu) by [@&#8203;itsauric](https://togithub.com/itsauric)
in
[Androz2091/discord-player#1607
- Update migrating.md by
[@&#8203;Crocross](https://togithub.com/Crocross) in
[Androz2091/discord-player#1629
- Update migrating.md by
[@&#8203;Crocross](https://togithub.com/Crocross) in
[Androz2091/discord-player#1637
- feat!: discord-player v6 by
[@&#8203;skdhg](https://togithub.com/skdhg) in
[Androz2091/discord-player#1513
    -   Rewrite of the entire queue system
    -   Rewrite of extractors API
    -   New audio filters API
    -   New Query Cache API
    -   New extractors limitation API
    -   New global shortcuts (hooks, player methods)
    -   Singleton by default
    -   Better stream handling
    -   2 events dispatcher (Player & Player.events)
    -   Improved debug logs
    -   New lifecycle events
    -   New stream hook (`onAfterCreateStream`)
    -   Various bugfixes to `StreamDispatcher`
    -   New voice receiving feature
    -   Removal of internal extractors
    -   Apple Music support (including search queries)
- Addition of Biquad filters, 15 band equalizer (lavalink compatible) &
its presets, DSP filters
    -   Stability of audio player
- Improved management of audioplayer lifecycle as well as voice
connection
    -   Removal of smooth volume
    -   Ability to play raw audio resources
    -   Dynamic duration estimation for tracks
    -   New query resolver types
    -   New documentation
    -   New utils package

#### New Contributors

- [@&#8203;itsauric](https://togithub.com/itsauric) made their first
contribution in
[Androz2091/discord-player#1552
- [@&#8203;BasboBibbins](https://togithub.com/BasboBibbins) made their
first contribution in
[Androz2091/discord-player#1580
- [@&#8203;Crocross](https://togithub.com/Crocross) made their first
contribution in
[Androz2091/discord-player#1606

**Full Changelog**:
Androz2091/discord-player@v5.4.0...v6.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/PixelPizza/OurTube).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM2LjUuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jaron <60853956+JaronZ@users.noreply.github.com>
Co-authored-by: mcpsbot <83839790+mcpsbot@users.noreply.github.com>
Co-authored-by: Jaron <jaron_zijlstra@outlook.com>
  • Loading branch information
4 people committed Jul 15, 2023
1 parent f431aef commit b6e6d04
Show file tree
Hide file tree
Showing 31 changed files with 4,652 additions and 4,495 deletions.
4 changes: 2 additions & 2 deletions .github/renovate.json
Expand Up @@ -25,8 +25,8 @@
"groupName": "Discord.JS Dependencies"
},
{
"matchPackageNames": ["discord-player"],
"groupName": "Discord Player Dependency"
"matchPakagePatterns": ["@discord-player", "discord-player"],
"groupName": "Discord Player Dependencies"
},
{
"matchDepTypes": ["engines"],
Expand Down
101 changes: 50 additions & 51 deletions .github/workflows/codeql.yml
Expand Up @@ -12,65 +12,64 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '21 16 * * 5'
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "21 16 * * 5"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
strategy:
fail-fast: false
matrix:
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@489225d82a57396c6f426a40e66d461b16b3461d # v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@489225d82a57396c6f426a40e66d461b16b3461d # v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@489225d82a57396c6f426a40e66d461b16b3461d # v2

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@489225d82a57396c6f426a40e66d461b16b3461d # v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@489225d82a57396c6f426a40e66d461b16b3461d # v2
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@489225d82a57396c6f426a40e66d461b16b3461d # v2
with:
category: "/language:${{matrix.language}}"
82 changes: 41 additions & 41 deletions .github/workflows/continuous-integration.yml
@@ -1,47 +1,47 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
merge_group:
push:
branches:
- main
pull_request:
merge_group:

jobs:
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
- name: Use Node.js v16
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: yarn --immutable
- name: Run ESLint
run: yarn lint --fix=false
Linting:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
- name: Use Node.js v16
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: yarn --immutable
- name: Run ESLint
run: yarn lint --fix=false

Building:
name: Compile source code
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: yarn --immutable
- name: Build Code
run: yarn build
Building:
name: Compile source code
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3
with:
node-version: 16
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
run: yarn --immutable
- name: Build Code
run: yarn build
18 changes: 9 additions & 9 deletions .github/workflows/dependency-review.yml
Expand Up @@ -4,17 +4,17 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
contents: read
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@1360a344ccb0ab6e9475edef90ad2f46bf8003b1 # v3
dependency-review:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: "Dependency Review"
uses: actions/dependency-review-action@1360a344ccb0ab6e9475edef90ad2f46bf8003b1 # v3
32 changes: 16 additions & 16 deletions .github/workflows/labelsync.yml
@@ -1,21 +1,21 @@
name: Automatic Label Sync

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
label_sync:
name: Automatic Label Synchronization
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
repository: "PixelPizza/.github"
- name: Run Label Sync
uses: crazy-max/ghaction-github-labeler@3de87da19416edc45c90cd89e7a4ea922a3aae5a # tag=v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
label_sync:
name: Automatic Label Synchronization
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
repository: "PixelPizza/.github"
- name: Run Label Sync
uses: crazy-max/ghaction-github-labeler@3de87da19416edc45c90cd89e7a4ea922a3aae5a # tag=v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -30,6 +30,7 @@
},
"homepage": "https://github.com/PixelPizza/OurTube#readme",
"dependencies": {
"@discord-player/extractor": "^4.4.0",
"@discordjs/opus": "^0.9.0",
"@kaname-png/plugin-statcord": "^2.1.12",
"@prisma/client": "^5.0.0",
Expand All @@ -39,7 +40,7 @@
"@sapphire/plugin-logger": "^3.0.4",
"@sapphire/time-utilities": "^1.7.9",
"common-tags": "^1.8.2",
"discord-player": "^5.4.0",
"discord-player": "^6.6.1",
"discord.js": "^14.11.0",
"dotenv": "^16.3.1",
"sodium-native": "^4.0.4",
Expand Down
17 changes: 15 additions & 2 deletions src/bot.ts
Expand Up @@ -18,8 +18,21 @@ const client = new SapphireClient({
debug: true
}
});
container.player = new Player(client);
container.player = Player.singleton(client, {
ytdlOptions: {
quality: "highest",
filter: "audioonly",
highWaterMark: 1 << 25,
dlChunkSize: 0
}
});
container.logger = new Logger(container, {level: LogLevel.Debug});
container.prisma = new PrismaClient();

void client.login(process.env.TOKEN).finally(() => container.prisma.$disconnect());
async function main() {
await container.player.extractors.loadDefault();

await client.login(process.env.TOKEN).finally(() => container.prisma.$disconnect());
}

void main();
2 changes: 1 addition & 1 deletion src/commands/clear.ts
Expand Up @@ -13,7 +13,7 @@ export class ClearCommand extends Command {

public async chatInputRun(interaction: Command.ChatInputInteraction): Promise<any> {
await interaction.deferReply();
this.container.player.getQueue(interaction.guild!)!.clear();
this.container.player.nodes.get(interaction.guild!)!.clear();
return interaction.editReply({
embeds: [
new EmbedBuilder()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/disconnect.ts
Expand Up @@ -17,7 +17,7 @@ export class DisconnectCommand extends Command {
const {guild} = interaction;
const {channel} = guild!.members.me!.voice;

this.container.player.deleteQueue(guild!);
this.container.player.queues.delete(guild!);

return interaction.editReply({
embeds: [
Expand Down
10 changes: 2 additions & 8 deletions src/commands/join.ts
Expand Up @@ -22,22 +22,16 @@ export class JoinCommand extends Command {
const {player} = this.container;
const {voice} = member as GuildMember;

const queue = player.createQueue(guild!, {
const queue = player.nodes.create(guild!, {
leaveOnEmpty: false,
leaveOnEnd: false,
ytdlOptions: {
quality: "highest",
filter: "audioonly",
highWaterMark: 1 << 25,
dlChunkSize: 0
},
metadata: interaction
});

try {
if (!queue.connection) await queue.connect(voice.channel!);
} catch {
player.deleteQueue(guild!);
player.queues.delete(guild!);
return void interaction.editReply({
embeds: [
new EmbedBuilder()
Expand Down
8 changes: 4 additions & 4 deletions src/commands/nowplaying.ts
Expand Up @@ -15,8 +15,8 @@ export class NowPlayingCommand extends Command {
public async chatInputRun(interaction: Command.ChatInputInteraction): Promise<any> {
await interaction.deferReply({ephemeral: true});

const queue = this.container.player.getQueue(interaction.guild!);
const nowPlaying = queue?.nowPlaying();
const queue = this.container.player.queues.get(interaction.guild!);
const nowPlaying = queue?.currentTrack;

if (!nowPlaying)
return interaction.editReply({
Expand All @@ -36,10 +36,10 @@ export class NowPlayingCommand extends Command {
.setDescription(
stripIndents`
[${nowPlaying.title}](${nowPlaying.url})
${queue!.createProgressBar()}
${queue!.node.createProgressBar()}
${await this.resolveCommandKey(interaction, "success.requestedBy", {
replace: {user: nowPlaying.requestedBy.toString()}
replace: {user: nowPlaying.requestedBy?.toString()}
})}
`
)
Expand Down

0 comments on commit b6e6d04

Please sign in to comment.