From a1af80b4a1be244bca7dd4979495546de4437f82 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Sat, 18 May 2024 11:03:01 +0900 Subject: [PATCH 1/3] update --- .env.example | 19 ------------------- .eslintignore | 1 - .gitignore | 23 ----------------------- .prettierignore | 1 - README.md | 38 ++++++++++++++++++++------------------ run.bat | 2 ++ 6 files changed, 22 insertions(+), 62 deletions(-) create mode 100644 run.bat diff --git a/.env.example b/.env.example index 5a900e626..776eddfe9 100644 --- a/.env.example +++ b/.env.example @@ -1,39 +1,20 @@ 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 for single server). - PRODUCTION = "true" # true for production. - 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 gave 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 = "ytsearch" # ytsearch (YouTube Search), spsearch (Spotify Search), scsearch (SoundCloud Search) or ytmsearch (YouTube Music Search). - MAX_PLAYLIST_SIZE = "100" # Max playlist size. - MAX_QUEUE_SIZE = "100" # Max queue size. - 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. diff --git a/.eslintignore b/.eslintignore index f29759856..47124de56 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -# Folders /.cache /.git /dist diff --git a/.gitignore b/.gitignore index f028e6f6b..1b287dee5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,40 +1,17 @@ - -# Keep environment variables out of version control .env - -# Ignore all files in the .vscode folder /.vscode - -# Ignore the build folder /dist - -# Ignore all files in the node_modules folder /node_modules - -# Ignore target folder - /target - - /yarn.lock - /.next - /node_modules - /pnpm-lock.yaml - /yarn-error.log - /yarn.lock - /.eslintcache - /package-lock.json - /Lavalink/application.yml - /Lavalink/plugins - /prisma/lavamusic.db /prisma/migrations \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index f29759856..47124de56 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ -# Folders /.cache /.git /dist diff --git a/README.md b/README.md index 09fb5fbf6..4fa24b9e4 100644 --- a/README.md +++ b/README.md @@ -117,24 +117,26 @@ Create a `.env` file in the root directory of your project with the following va or you can use the [.env.example](https://raw.githubusercontent.com/appujet/lavamusic/main/.env.example) file ```bash -TOKEN="." # Your bot token -PREFIX= "!" # Your prefix -OWNER_IDS=["959276033683628122","859640640640640640"] # Your discord id, you can add multiple ids -GUILD_ID= "859640640640640640" # Your server Id if you want to use the for single server -PRODUCTION="true" # true for production -SEARCH_ENGINE= "ytsearch" # ytsearch, scsearch or ytmsearch -MAX_PLAYLIST_SIZE= "100" # Max playlist size -MAX_QUEUE_SIZE= "100" # Max queue size -BOT_STATUS= "online" # Your bot status -BOT_ACTIVITY= "Lavamusic" # Your bot activity -LAVALINK_URL="lavalink:2333" # Your lavalink url -LAVALINK_AUTH="youshallnotpass" # Your lavalink password -LAVALINK_NAME="Blacky" # Your lavalink name -LAVALINK_SECURE= "false" # true for secure lavalink -KEEP_ALIVE= "false" # true for keep alive in https://replit.com -LOG_CHANNEL_ID="" -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 -CLIENT_ID="." # This is your bot's client ID. If this value is left blank, bots cannot be invited using /invite or /about commands. +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 for single server). +PRODUCTION = "true" # true for production. +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 gave 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 = "ytsearch" # ytsearch (YouTube Search), spsearch (Spotify Search), scsearch (SoundCloud Search) or ytmsearch (YouTube Music Search). +MAX_PLAYLIST_SIZE = "100" # Max playlist size. +MAX_QUEUE_SIZE = "100" # Max queue size. +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. ``` ## Prisma Setup diff --git a/run.bat b/run.bat new file mode 100644 index 000000000..29525e256 --- /dev/null +++ b/run.bat @@ -0,0 +1,2 @@ +@echo off +npm start \ No newline at end of file From 59c235568e9764d50fd3a7107762a14877c67eb9 Mon Sep 17 00:00:00 2001 From: hwangsihu Date: Sat, 18 May 2024 11:20:10 +0900 Subject: [PATCH 2/3] update commands --- src/commands/music/Leave.ts | 2 +- src/commands/music/Search.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/music/Leave.ts b/src/commands/music/Leave.ts index c9587d135..5e280a2da 100644 --- a/src/commands/music/Leave.ts +++ b/src/commands/music/Leave.ts @@ -10,7 +10,7 @@ export default class Leave extends Command { usage: 'leave', }, category: 'music', - aliases: ['dc'], + aliases: ['l'], cooldown: 3, args: false, player: { diff --git a/src/commands/music/Search.ts b/src/commands/music/Search.ts index 6741a46a1..6964d9325 100644 --- a/src/commands/music/Search.ts +++ b/src/commands/music/Search.ts @@ -14,7 +14,7 @@ export default class Search extends Command { usage: 'search', }, category: 'music', - aliases: ['search'], + aliases: ['src'], cooldown: 3, args: true, player: { From 10d6a8f327334404b193b6488e5d0756200ea8b7 Mon Sep 17 00:00:00 2001 From: LucasB25 <50886682+LucasB25@users.noreply.github.com> Date: Sat, 18 May 2024 10:14:29 +0200 Subject: [PATCH 3/3] Update Search.ts Signed-off-by: LucasB25 <50886682+LucasB25@users.noreply.github.com> --- src/commands/music/Search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/music/Search.ts b/src/commands/music/Search.ts index 6964d9325..a3e265a82 100644 --- a/src/commands/music/Search.ts +++ b/src/commands/music/Search.ts @@ -14,7 +14,7 @@ export default class Search extends Command { usage: 'search', }, category: 'music', - aliases: ['src'], + aliases: [''], cooldown: 3, args: true, player: {