diff --git a/README.md b/README.md index 8b145db..cf99214 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,17 @@ You must use it with the commands set in the ```BOT_NAME``` mentioned above. |skip|Skips one song.| |help|Provides a manual for the commands.| +## Docker Hub + +The image file is provided on [Docker hub](https://hub.docker.com/repository/docker/heesu998/discordgo-music-bot/general)! +After pulling it, you can use it by entering the commands in order. + +#### Pull docker image +``` +docker pull heesu998/discordgo-music-bot +``` + +#### Running a container +``` +sudo docker run -e DISCORD_PUBLIC_KEY=[your_public_key] -e YOUTUBE_PUBLIC_KEY=[your_public_key] --name [container name] heesu998/discordgo-music-bot +``` diff --git a/config/config.go b/config/config.go index 975be3d..2b094ce 100644 --- a/config/config.go +++ b/config/config.go @@ -23,8 +23,8 @@ func init() { env, err := godotenv.Read("./.env") if err != nil { - fmt.Printf("Not found .env File : ") - fmt.Printf("It fetches the specified environment variables, not from the .env file.") + fmt.Println("Not found .env File!") + fmt.Println("It fetches the specified environment variables, not from the .env file.") specifiedEnv() } else { envFile(env) @@ -103,7 +103,7 @@ func specifiedEnv() { if discrodToken != "" { c.discordToken = discrodToken } else { - panic("Not found in .env file the 'DISCORD_PUBLIC_KEY'!") + panic("Not found the 'DISCORD_PUBLIC_KEY'!") } youtubeToken := os.Getenv("YOUTUBE_PUBLIC_KEY") @@ -111,13 +111,13 @@ func specifiedEnv() { if youtubeToken != "" { c.youtubeToken = youtubeToken } else { - panic("Not found in .env file the 'YOUTUBE_PUBLIC_KEY'!") + panic("Not found the 'YOUTUBE_PUBLIC_KEY'!") } queueSize, err := strconv.Atoi(os.Getenv("MUSIC_QUEUE_SIZE")) if err != nil { - fmt.Println("Not correct format in .env file the 'MUSIC_QUEUE_SIZE'!") + fmt.Println("Not correct format the 'MUSIC_QUEUE_SIZE'!") fmt.Println("Use the default for 'MUSIC_QUUE_SIZE'.") c.queueSize = 10 } else { @@ -127,7 +127,7 @@ func specifiedEnv() { musicDuration, err := strconv.Atoi(os.Getenv("MUSIC_DURATION")) if err != nil { - fmt.Println("Not correct format in .env file the 'MUSIC_DURATION'!") + fmt.Println("Not correct format the 'MUSIC_DURATION'!") fmt.Println("Use the default for 'MUSIC_DURATION'.") c.musicDuration = 480 } else { @@ -139,7 +139,7 @@ func specifiedEnv() { if botName != "" { c.botName = botName } else { - fmt.Println("Not found in .env file the 'BOT_NAME'!") + fmt.Println("Not found the 'BOT_NAME'!") fmt.Println("Use the default for 'BOT_NAME'.") c.botName = "!music" } @@ -147,7 +147,7 @@ func specifiedEnv() { searchListMax, err := strconv.Atoi(os.Getenv("MAX_MUSIC_SEARCH_LIST")) if err != nil { - fmt.Println("Not correct format in .env file the 'MAX_MUSIC_SEARCH_LIST'!") + fmt.Println("Not correct format the 'MAX_MUSIC_SEARCH_LIST'!") fmt.Println("Use the default for 'MAX_MUSIC_SEARCH_LIST'.") c.searchListMax = 5 } else {