Skip to content

Commit

Permalink
Merge pull request #711 from appujet/main
Browse files Browse the repository at this point in the history
Update to production
  • Loading branch information
appujet authored Aug 31, 2024
2 parents dba2df1 + 6695f2c commit 5124c86
Show file tree
Hide file tree
Showing 63 changed files with 1,128 additions and 938 deletions.
12 changes: 7 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ DEFAULT_LANGUAGE= "EnglishUS" # Default language for bot
PREFIX= "!" # Your prefix.
OWNER_IDS= ["",""] # Your discord id (You can add multiple ids.).
GUILD_ID= "" # Your server ID (If you want to use the bot for a single server).
PRODUCTION= "true" # true for production.
TOPGG= "" # Your Top.gg API key. Obtain this from https://top.gg
KEEP_ALIVE= "false" # true for keep alive in https://replit.com
LOG_CHANNEL_ID= "" # If you enter this, you will be able to receive the status of Lavalink nodes and guild join/leave logs through the corresponding channel.
Expand All @@ -14,9 +13,12 @@ BOT_ACTIVITY_TYPE= 0 # Activity type is a number from 0 to 5. See more here: htt
BOT_ACTIVITY=" Lavamusic" # Your bot activity.
DATABASE_URL= "" # Your database url (If you want to use sqlite, then you can leave it blank.).
AUTO_NODE=" false" # true for auto node. It is given from lavainfo-api (https://lavainfo-api.deno.dev).
LAVALINK_URL= "localhost:2333" # Your Lavalink url (If auto node is true, then you can leave it blank).
LAVALINK_AUTH= "youshallnotpass" # Your Lavalink password (If auto node is true, then you can leave it blank.).
LAVALINK_NAME= "Lavamusic" # Your Lavalink name (If auto node is true, then you can leave it blank.).
LAVALINK_SECURE= "false" # true for secure Lavalink (If auto node is true, then you can leave it blank.).
SEARCH_ENGINE= "YouTubeMusic" # Search engine to be used when playing the song. You can use: YouTube, YouTubeMusic, SoundCloud, Spotify, Apple, Deezer, Yandex and JioSaavn
MAX_PLAYLIST_SIZE= "100" # Max playlist size.
MAX_QUEUE_SIZE= "100" # Max queue size.

# Configuration for multiple Lavalink servers
LAVALINK_SERVERS = '[
{"url":"localhost:2333","auth":"youshallnotpass","name":"Local Node","secure":false},
{"url":"localhost:2333","auth":"youshallnotpass2","name":"Another Node","secure":false}
]'
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "00:00"
allow:
- dependency-type: all
open-pull-requests-limit: 10
rebase-strategy: auto
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "daily"
time: "00:00"
allow:
- dependency-type: all
open-pull-requests-limit: 10
rebase-strategy: auto
1 change: 0 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: push
jobs:
docker_publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
11 changes: 9 additions & 2 deletions Lavalink/example.application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins:
tiktok: true # tiktok.com
mixcloud: true # mixcloud.com
soundgasm: true # soundgasm.net
pixeldrain: true # pixeldrain.com
jiosaavn:
apiURL: "https://saavn.dev/api" # The API URL for JioSaavn
lavasrc:
Expand Down Expand Up @@ -45,7 +46,7 @@ plugins:
countryCode: "US" # the country code you want to use for filtering the artists top tracks. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
playlistLoadLimit: 6 # The number of pages at 100 tracks each
albumLoadLimit: 6 # The number of pages at 50 tracks each
localFiles: false # Enable local files support with Spotify playlists. Please note `uri` & `iscr` will be `null` & `identifier` will be `"local"`
localFiles: false # Enable local files support with Spotify playlists. Please note `uri` & `isrc` will be `null` & `identifier` will be `"local"`
applemusic:
countryCode: "US" # the country code you want to use for filtering the artists top tracks and language. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
mediaAPIToken: "your apple music api token" # apple music api token
Expand Down Expand Up @@ -89,6 +90,12 @@ plugins:
- ANDROID_LITE
- MEDIA_CONNECT
- IOS
# This secure your lavalink is working and playing music if you used this two things below.
oauth:
enabled: true # IF YOU RUN YOUR LAVALINK CHECK YOUR CONSOLE AND CLICK THE GOOGLE.COM/DEVICES LINK AND THERE IS A CODE THAT YOU NEED TO PUT IN TO THE GOOGLE AND USE A BURNER ACCOUNT OR ALT ACCOUNT THERE IS A POSSIBLE CHANGE YOU CAN GET BANNED FROM GOOGLE OR YOUTUBE SO JUST USE A BURNER ACCOUNT IN CASE.
pot:
token: "" # THIS REQUIRE INSTALLING https://github.com/iv-org/youtube-trusted-session-generator THIS IS A PYTHON FILE INSTALL THE REQUIREMENTS AND RUN PYTON INDEX FILE AND AFTER RUNNING YOU WILL RECIVE AND TOKEN AND VISTOR DATA AND PASTE IT BELOW.
visitorData: ""
lavalink:
plugins:
- dependency: "com.github.appujet:jiosaavn-plugin:0.1.7"
Expand All @@ -101,7 +108,7 @@ lavalink:
snapshot: false # set to true if you want to use snapshot builds.
- dependency: "com.github.topi314.sponsorblock:sponsorblock-plugin:3.0.1"
snapshot: false # set to true if you want to use snapshot builds.
- dependency: "dev.lavalink.youtube:youtube-plugin:1.5.2"
- dependency: "dev.lavalink.youtube:youtube-plugin:1.7.2"
snapshot: false # set to true if you want to use snapshot builds.
pluginsDir: './plugins'
server:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
<br />
<p align="center">
<a href="https://github.com/appujet/lavamusic">
<img src="https://cdn.discordapp.com/avatars/875635121770889257/d427591ca92c868114fbdd9dca436086.png?size=512" alt="lavamusic" width="200" height="200">
<img src="https://cdn.discordapp.com/avatars/875635121770889257/adc4fd956872a72814b70448d1fddd40.webp?size=512" alt="lavamusic" width="200" height="200">
</a>

<h1 align="center">Lavamusic</h1>
<p align="center">Lavamusic is a Discord music bot that uses Discord.js, Shoukaku, and TypeScript.
<br />
<br />
<a href="https://discord.com/oauth2/authorize?client_id=977742811132743762&scope=bot+applications.commands&permissions=8">Invite Lavamusic</a>
<a href="https://discord.com/oauth2/authorize?client_id=875635121770889257&scope=bot+applications.commands&permissions=8">Invite Lavamusic</a>
·
<a href="https://github.com/appujet/lavamusic/issues">Report Bug & Request Feature</a>
</p>
Expand Down Expand Up @@ -157,11 +157,10 @@ DEFAULT_LANGUAGE= "EnglishUS" # Default language for bot
PREFIX="!" # Your prefix
OWNER_IDS=["859640640640640640","859640640640640640"] # Your discord id, you can add multiple ids
GUILD_ID="859640640640640640" # Your server ID (if you want to use it for a single server)
PRODUCTION="true" # "true" for production
```

For more information how to fill all the variables go to this page.
You do not need to edit anything like the LAVA_LINK_URL, LAVA_LINK_AUTH, LAVA_LINK_NAME, LAVA_LINK_SECURE, DATABASE_URL, and the ports unless you know what you're doing.
You do not need to edit anything like the LAVALINK_SERVERS, DATABASE_URL and the ports unless you know what you're doing.
After saving your changes you can open a terminal and go to the same location as the docker-compose.yml file. Then run the following:

```bash
Expand Down Expand Up @@ -243,4 +242,4 @@ Thanks go to these wonderful people:
[license-shield]: https://img.shields.io/github/license/appujet/lavamusic.svg?style=for-the-badge
[license-url]: https://github.com/appujet/lavamusic/blob/master/LICENSE
[support-server]: https://discord.gg/PMpJnJaHmy
[support-shield]: https://img.shields.io/discord/942117923001098260.svg?style=for-the-badge&logo=discord&colorB=7289DA
[support-shield]: https://img.shields.io/discord/942117923001098260.svg?style=for-the-badge&logo=discord&colorB=7289DA
17 changes: 11 additions & 6 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,30 @@
"rules": {
"all": true,
"suspicious": {
"noExplicitAny": "off",
"noConfusingVoidType": "off",
"noConsoleLog": "off",
"noEmptyBlockStatements": "off",
"noExplicitAny": "off",
"noGlobalIsFinite": "off",
"noGlobalIsNan": "off",
"noEmptyBlockStatements": "off"
"useAwait": "off"
},
"style": {
"noDefaultExport": "off",
"noInferrableTypes": "off",
"noNamespaceImport": "off",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"noInferrableTypes": "off",
"useNumberNamespace": "off",
"noDefaultExport": "off",
"useBlockStatements": "off",
"useFilenamingConvention": "off",
"useNamingConvention": "off",
"useNumberNamespace": "off",
"useSingleCaseStatement": "off"
},
"complexity": {
"noBannedTypes": "off",
"noForEach": "off",
"noStaticOnlyClass": "off",
"noExcessiveCognitiveComplexity": {
"level": "warn",
"options": {
Expand All @@ -39,6 +43,7 @@
"noGlobalEval": "off"
},
"correctness": {
"noNodejsModules": "off",
"noVoidTypeReturn": "off"
},
"performance": {
Expand Down Expand Up @@ -74,7 +79,7 @@
}
},
"files": {
"ignoreUnknown": true,
"ignoreUnknown": false,
"ignore": [".vscode", "dist", "locales", "node_modules"]
}
}
7 changes: 5 additions & 2 deletions locales/Bulgarian.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"lavalink": {
"description": "Shows the current Lavalink stats.",
"title": "Lavalink Stats",
"content": "Player: {players}\nPlaying Players: {playingPlayers}\nUptime: {uptime}\nCores: {cores} Core(s)\nMemory Usage: {used} / {reservable}\nSystem Load: {systemLoad}%\nLavalink Load: {lavalinkLoad}%"
"content": "Player: {players}\nPlaying Players: {playingPlayers}\nUptime: {uptime}\nCores: {cores} Core(s)\nMemory Usage: {used} / {reservable}\nSystem Load: {systemLoad}%\nLavalink Load: {lavalinkLoad}%",
"page_info": "Page {index} of {total}"
},
"invite": {
"description": "Get the bot invite link.",
Expand Down Expand Up @@ -585,7 +586,9 @@
"error": "An error occurred: `{error}`",
"no_voice_channel_queue": "You are not connected to a voice channel to queue songs.",
"no_permission_connect_speak": "I don't have enough permission to connect/speak in <#{channel}>.",
"different_voice_channel_queue": "You are not connected to <#{channel}> to queue songs."
"different_voice_channel_queue": "You are not connected to <#{channel}> to queue songs.",
"vote_button": "Vote for me!",
"vote_message": "Wait! You need to vote on top.gg to use this command. Thanks."
},
"setupButton": {
"no_voice_channel_button": "You are not connected to a voice channel to use this button.",
Expand Down
7 changes: 5 additions & 2 deletions locales/Croatian.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"lavalink": {
"description": "Shows the current Lavalink stats.",
"title": "Lavalink Stats",
"content": "Player: {players}\nPlaying Players: {playingPlayers}\nUptime: {uptime}\nCores: {cores} Core(s)\nMemory Usage: {used} / {reservable}\nSystem Load: {systemLoad}%\nLavalink Load: {lavalinkLoad}%"
"content": "Player: {players}\nPlaying Players: {playingPlayers}\nUptime: {uptime}\nCores: {cores} Core(s)\nMemory Usage: {used} / {reservable}\nSystem Load: {systemLoad}%\nLavalink Load: {lavalinkLoad}%",
"page_info": "Page {index} of {total}"
},
"invite": {
"description": "Get the bot invite link.",
Expand Down Expand Up @@ -585,7 +586,9 @@
"error": "An error occurred: `{error}`",
"no_voice_channel_queue": "You are not connected to a voice channel to queue songs.",
"no_permission_connect_speak": "I don't have enough permission to connect/speak in <#{channel}>.",
"different_voice_channel_queue": "You are not connected to <#{channel}> to queue songs."
"different_voice_channel_queue": "You are not connected to <#{channel}> to queue songs.",
"vote_button": "Vote for me!",
"vote_message": "Wait! You need to vote on top.gg to use this command. Thanks."
},
"setupButton": {
"no_voice_channel_button": "You are not connected to a voice channel to use this button.",
Expand Down
Loading

0 comments on commit 5124c86

Please sign in to comment.