Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main to production #678

Merged
merged 30 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
321b4e5
format & lint
LucasB25 Aug 5, 2024
d29608f
fix: add DEFAULT_LANGUAGE to ReadME
whlack Aug 5, 2024
9cbc67a
Merge pull request #665 from whlack/patch-1
LucasB25 Aug 5, 2024
208b04b
format/lint and update
LucasB25 Aug 6, 2024
5a042fe
ts strict true
LucasB25 Aug 6, 2024
9528706
Update Play.ts
infnibor Aug 6, 2024
b1cfe5c
Update PlayNext.ts
infnibor Aug 6, 2024
109f1df
Adjusting the proper handling of the GuildList and GuildLeave command…
infnibor Aug 6, 2024
60e154c
Update lavalink settings and format
hwangsihu Aug 6, 2024
38ad663
Update README.md
hwangsihu Aug 7, 2024
7382b39
Merge pull request #668 from hwangsihu/main
LucasB25 Aug 7, 2024
9299303
README.md
hwangsihu Aug 7, 2024
00a791a
Merge pull request #669 from hwangsihu/main
LucasB25 Aug 7, 2024
fc04878
Merge branch 'appujet:main' into main
infnibor Aug 7, 2024
334e469
Update example.application.yml
infnibor Aug 7, 2024
6f10a74
Fixed displaying variables
infnibor Aug 7, 2024
ffa6487
Fix overwritten commit files
infnibor Aug 7, 2024
3dd4fc7
Lint fix
infnibor Aug 7, 2024
7345552
Merge pull request #670 from infnibor/main
LucasB25 Aug 7, 2024
ff62f54
lint fix
LucasB25 Aug 8, 2024
784b620
Format
hwangsihu Aug 8, 2024
d011ad2
Merge pull request #672 from hwangsihu/main
LucasB25 Aug 8, 2024
73ae233
update
LucasB25 Aug 8, 2024
a0faea9
Update Shoukaku.ts
LucasB25 Aug 8, 2024
18629dd
Add Indonesian Language
idMJA Aug 10, 2024
a618504
Update Translation.md
idMJA Aug 10, 2024
3932798
Merge pull request #673 from idMJA/main
LucasB25 Aug 10, 2024
fc8b733
Update package.json
hwangsihu Aug 9, 2024
5788539
Update korean translation
hwangsihu Aug 10, 2024
cf09fdd
Merge pull request #675 from hwangsihu/main
LucasB25 Aug 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lavalink/example.application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ plugins:
- IOS
lavalink:
plugins:
- dependency: "com.github.appujet:jiosaavn-plugin:v0.1.6"
- dependency: "com.github.appujet:jiosaavn-plugin:0.1.7"
repository: "https://jitpack.io"
- dependency: "com.dunctebot:skybot-lavalink-plugin:1.7.0"
snapshot: false # set to true if you want to use snapshot builds.
- dependency: "com.github.topi314.lavasearch:lavasearch-plugin:1.0.0"
snapshot: false # set to true if you want to use snapshot builds (see below)
snapshot: false # set to true if you want to use snapshot builds.
- dependency: "com.github.topi314.lavasrc:lavasrc-plugin:4.2.0"
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.1"
- dependency: "dev.lavalink.youtube:youtube-plugin:1.5.2"
snapshot: false # set to true if you want to use snapshot builds.
pluginsDir: './plugins'
server:
Expand Down
51 changes: 15 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

### 🔍 Default Sources

- ![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white) ([Required Plugin][youtube-source])
- ![SoundCloud](https://img.shields.io/badge/SoundCloud-FF3300?style=plastic&logo=soundcloud&logoColor=white)
- ![Twitch](https://img.shields.io/badge/Twitch-9146FF?style=plastic&logo=twitch&logoColor=white)
- ![Bandcamp](https://img.shields.io/badge/Bandcamp-629AA9?style=plastic&logo=bandcamp&logoColor=white)
Expand All @@ -55,10 +54,11 @@
- ![Mixer](https://img.shields.io/badge/Mixer-FFA500?style=plastic&logo=mixer&logoColor=white)
- ![http](https://img.shields.io/badge/http-FFA500?style=plastic&logo=http&logoColor=white)

### 🔌 Plugin Sources: `(Require: LavaSrc and Skybot Plugin)`
### 🔌 Plugin Sources

**Note: You need to install the plugins to use these sources**

- ![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white) ([Required Plugin][youtube-source])
- ![Spotify](https://img.shields.io/badge/Spotify-1ED760?style=plastic&logo=spotify&logoColor=white) ([Required Plugin][LavaSrc])
- ![Deezer](https://img.shields.io/badge/Deezer-FF0000?style=plastic&logo=deezer&logoColor=white) ([Required Plugin][LavaSrc])
- ![Apple Music](https://img.shields.io/badge/Apple%20Music-000000?style=plastic&logo=apple-music&logoColor=white) ([Required Plugin][LavaSrc])
Expand All @@ -78,9 +78,11 @@
[youtube-source]: https://github.com/lavalink-devs/youtube-source
[jiosaavn]: https://github.com/appujet/jiosaavn-plugin

To Setup a Lavalink server on Windows, Linux, or Replit, [Click Here.](https://github.com/LucasB25/lavalink-server)
To Setup a Lavalink server on Windows, Linux, or Replit, [Click Here!](https://github.com/LucasB25/lavalink-server)

### **Need Help with plugins?** Join our [Discord Server](https://discord.gg/YsJCtDuTXp) and ask for help in the `#support` channel
### **Need help with plugins?**

Join our [Discord Server](https://discord.gg/YsJCtDuTXp) and ask for help in the `#support` channel!

## 🔧 Requirements

Expand Down Expand Up @@ -116,41 +118,16 @@ cd lavamusic
npm i
```

4. Set up your environment variables:
Create a .env file in the root directory of your project with the following variables:
or you can use the [.env.example](https://raw.githubusercontent.com/appujet/lavamusic/main/.env.example) file

```bash
TOKEN= "" # Your bot token.
CLIENT_ID= "" # Your bot's client ID (If this value is left blank, bots cannot be invited using /invite or /about commands.).
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.
LOG_COMMANDS_ID= "" # The channel ID where command usage logs will be sent.
BOT_STATUS= "online" # Your bot status (online, dnd, idle, invisible or offline).
BOT_ACTIVITY_TYPE= 0 # Activity type is a number from 0 to 5. See more here: https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
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.).
MAX_PLAYLIST_SIZE= "100" # Max playlist size.
MAX_QUEUE_SIZE= "100" # Max queue size.
```
4. Copy the .env.example file to .env and fill in all required values.
Note: Optional values ​​are noted as comments in the settings.

5. Generate the Prisma client:

```bash
npm run db:push
```

6. Run the migrations (Only if you want to migrate your database)
6. Run the migrations (Only if you want to migrate your database):

```bash
npm run db:migrate
Expand All @@ -166,17 +143,17 @@ npm start

8. Invite the bot to your server:

Generate an invite link for your bot and invite it to your server using the <a href="https://discord.com/developers/applications">Discord Developer Portal</a> or using <a href="https://discordapi.com/permissions.html">Permissions Calculator.</a>
Generate an invite link for your bot and invite it to your server using the [Discord Developer Portal](https://discord.com/developers/applications) or [Permissions Calculator](https://discordapi.com/permissions.html).

## 🚀 Installation using Docker Compose

This section assumes you have Docker and Docker Compose installed and running correctly.
Download the [docker-compose.yml file](https://raw.githubusercontent.com/appujet/lavamusic/main/docker-compose.yml) in a separate folder like lavamusic.
Edit docker-compose.yml and make sure to set the following variables:
Your .env file should look like this or you can use the [.env.example](https://raw.githubusercontent.com/appujet/lavamusic/main/.env.example) file.
Your .env file should look like this or you can use the .env.example file.

```yaml
TOKEN="." # Your bot token and remember, don't show everyone your bot token
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)
Expand All @@ -192,6 +169,8 @@ docker-compose up -d
```

The above command will start all your services and your bot should be up and running!
If you want to run it from the console, remove the -d argument.

To update, you only have to type the following:

```bash
Expand Down Expand Up @@ -223,7 +202,7 @@ Do note that the bot will restart itself to update to the latest!

## 📝 Tutorial

A tutorial has been uploaded on YouTube. Watch it by clicking [here](https://youtu.be/x5lQD2rguz0).
A tutorial has been uploaded on YouTube. Watch it by [clicking here](https://youtu.be/x5lQD2rguz0).

## 📜 Contributing

Expand Down
2 changes: 1 addition & 1 deletion Translation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [x] German - `German.json` [by @LucasB25](https://github.com/LucasB25)
- [x] Russian - `Russian.json` [by @LucasB25](https://github.com/LucasB25)
- [x] Korean - `Korean.json` [by @hwangsihu](https://github.com/hwangsihu)
- [ ] Indonesian - `Indonesian.json` (Not Started)
- [x] Indonesian - `Indonesian.json` [by @iaMJ](https://github.com/idMJA)
- [ ] English (GB) - `EnglishGB.json` (Not Started)
- [ ] Bulgarian - `Bulgarian.json` (Not Started)
- [x] Chinese (CN) - `ChineseCN.json` [by @appujet](https://github.com/Appujet) (Ai Translation - Not Accurate)
Expand Down
28 changes: 16 additions & 12 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,35 @@
}
}
},
"files": {
"ignoreUnknown": true,
"ignore": [".vscode", "dist", "locales", "node_modules"]
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"lineWidth": 100
}
},
"formatter": {
"enabled": true,
"indentWidth": 4,
"indentStyle": "space",
"lineWidth": 140,
"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": true,
"ignore": [".vscode", "dist", "locales", "node_modules"]
}
}
Loading