mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-29 10:22:58 +08:00
commit
be1e526363
@ -2,5 +2,9 @@
|
||||
### Their [Github](https://github.com/jagrosh/MusicBot)
|
||||
A Discord music bot that's easy to set up and run yourself!
|
||||
|
||||
### Config
|
||||
|
||||
Edit the startup variables before starting the bot, otherwise it will fail to start
|
||||
|
||||
### Server Ports
|
||||
There are no ports required for JMusicBot
|
179
bots/discord/jmusicbot/config.txt
Normal file
179
bots/discord/jmusicbot/config.txt
Normal file
@ -0,0 +1,179 @@
|
||||
/////////////////////////////////////////////////////////
|
||||
// Config for the JMusicBot //
|
||||
/////////////////////////////////////////////////////////
|
||||
// Any line starting with // is ignored //
|
||||
// You MUST set the token and owner //
|
||||
// All other items have defaults if you don't set them //
|
||||
// Open in Notepad++ for best results //
|
||||
/////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// This sets the token for the bot to log in with
|
||||
// This MUST be a bot token (user tokens will not work)
|
||||
// If you don't know how to get a bot token, please see the guide here:
|
||||
// https://github.com/jagrosh/MusicBot/wiki/Getting-a-Bot-Token
|
||||
|
||||
token = BOT_TOKEN_HERE
|
||||
|
||||
|
||||
// This sets the owner of the bot
|
||||
// This needs to be the owner's ID (a 17-18 digit number)
|
||||
// https://github.com/jagrosh/MusicBot/wiki/Finding-Your-User-ID
|
||||
|
||||
owner = 0
|
||||
|
||||
|
||||
// This sets the prefix for the bot
|
||||
// The prefix is used to control the commands
|
||||
// If you use !!, the play command will be !!play
|
||||
// If you do not set this, the prefix will be a mention of the bot (@Botname play)
|
||||
// If you make this blank, the bot will not use a prefix
|
||||
|
||||
prefix = "@mention"
|
||||
|
||||
|
||||
// If you set this, it modifies the default game of the bot
|
||||
// Set this to NONE to have no game
|
||||
// Set this to DEFAULT to use the default game
|
||||
// You can make the game "Playing X", "Listening to X", or "Watching X"
|
||||
// where X is the title. If you don't include an action, it will use the
|
||||
// default of "Playing"
|
||||
|
||||
game = "DEFAULT"
|
||||
|
||||
|
||||
// If you set this, it will modify the default status of bot
|
||||
// Valid values: ONLINE IDLE DND INVISIBLE
|
||||
|
||||
status = ONLINE
|
||||
|
||||
|
||||
// If you set this to true, the bot will list the title of the song it is currently playing in its
|
||||
// "Playing" status. Note that this will ONLY work if the bot is playing music on ONE guild;
|
||||
// if the bot is playing on multiple guilds, this will not work.
|
||||
|
||||
songinstatus=false
|
||||
|
||||
|
||||
// If you set this, the bot will also use this prefix in addition to
|
||||
// the one provided above
|
||||
|
||||
altprefix = "NONE"
|
||||
|
||||
|
||||
// If you set these, it will change the various emojis
|
||||
|
||||
success = "🎶"
|
||||
warning = "💡"
|
||||
error = "🚫"
|
||||
loading = "⌚"
|
||||
searching = "🔎"
|
||||
|
||||
|
||||
// If you set this, you change the word used to view the help.
|
||||
// For example, if you set the prefix to !! and the help to cmds, you would type
|
||||
// !!cmds to see the help text
|
||||
|
||||
help = help
|
||||
|
||||
|
||||
// If you set this, the "nowplaying" command will show youtube thumbnails
|
||||
// Note: If you set this to true, the nowplaying boxes will NOT refresh
|
||||
// This is because refreshing the boxes causes the image to be reloaded
|
||||
// every time it refreshes.
|
||||
|
||||
npimages = false
|
||||
|
||||
|
||||
// If you set this, the bot will not leave a voice channel after it finishes a queue.
|
||||
// Keep in mind that being connected to a voice channel uses additional bandwith,
|
||||
// so this option is not recommended if bandwidth is a concern.
|
||||
|
||||
stayinchannel = false
|
||||
|
||||
|
||||
// This sets the maximum amount of seconds any track loaded can be. If not set or set
|
||||
// to any number less than or equal to zero, there is no maximum time length. This time
|
||||
// restriction applies to songs loaded from any source.
|
||||
|
||||
maxtime = 0
|
||||
|
||||
|
||||
// This sets an alternative folder to be used as the Playlists folder
|
||||
// This can be a relative or absolute path
|
||||
|
||||
playlistsfolder = "Playlists"
|
||||
|
||||
|
||||
// By default, the bot will DM the owner if the bot is running and a new version of the bot
|
||||
// becomes available. Set this to false to disable this feature.
|
||||
|
||||
updatealerts=true
|
||||
|
||||
|
||||
// Changing this changes the lyrics provider
|
||||
// Currently available providers: "A-Z Lyrics", "Genius", "MusicMatch"
|
||||
// At the time of writing, I would recommend sticking with A-Z Lyrics or MusicMatch,
|
||||
// as Genius tends to have a lot of non-song results and you might get something
|
||||
// completely unrelated to what you want.
|
||||
// If you are interested in contributing a provider, please see
|
||||
// https://github.com/jagrosh/JLyrics
|
||||
|
||||
lyrics.default = "A-Z Lyrics"
|
||||
|
||||
|
||||
// These settings allow you to configure custom aliases for all commands.
|
||||
// Multiple aliases may be given, separated by commas.
|
||||
//
|
||||
// Example 1: Giving command "play" the alias "p":
|
||||
// play = [ p ]
|
||||
//
|
||||
// Example 2: Giving command "search" the aliases "yts" and "find":
|
||||
// search = [ yts, find ]
|
||||
|
||||
aliases {
|
||||
// General commands
|
||||
settings = [ status ]
|
||||
|
||||
// Music commands
|
||||
lyrics = []
|
||||
nowplaying = [ np, current ]
|
||||
play = []
|
||||
playlists = [ pls ]
|
||||
queue = [ list ]
|
||||
remove = [ delete ]
|
||||
scsearch = []
|
||||
search = [ ytsearch ]
|
||||
shuffle = []
|
||||
skip = [ voteskip ]
|
||||
|
||||
// Admin commands
|
||||
prefix = [ setprefix ]
|
||||
setdj = []
|
||||
settc = []
|
||||
setvc = []
|
||||
|
||||
// DJ Commands
|
||||
forceremove = [ forcedelete, modremove, moddelete ]
|
||||
forceskip = [ modskip ]
|
||||
movetrack = [ move ]
|
||||
pause = []
|
||||
playnext = []
|
||||
repeat = []
|
||||
skipto = [ jumpto ]
|
||||
stop = []
|
||||
volume = [ vol ]
|
||||
}
|
||||
|
||||
// If you set this to true, it will enable the eval command for the bot owner. This command
|
||||
// allows the bot owner to run arbitrary code from the bot's account.
|
||||
//
|
||||
// WARNING:
|
||||
// This command can be extremely dangerous. If you don't know what you're doing, you could
|
||||
// cause horrific problems on your Discord server or on whatever computer this bot is running
|
||||
// on. Never run this command unless you are completely positive what you are running.
|
||||
//
|
||||
// DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT THIS DOES OR HOW TO USE IT
|
||||
// IF SOMEONE ASKS YOU TO ENABLE THIS, THERE IS AN 11/10 CHANCE THEY ARE TRYING TO SCAM YOU
|
||||
|
||||
eval=false
|
@ -3,10 +3,11 @@
|
||||
"meta": {
|
||||
"version": "PTDL_v1"
|
||||
},
|
||||
"exported_at": "2020-06-15T17:43:44-04:00",
|
||||
"exported_at": "2020-11-18T00:37:48+02:00",
|
||||
"name": "JMusicBot",
|
||||
"author": "parker@parkervcp.com",
|
||||
"description": "A Discord music bot that's easy to set up and run yourself!",
|
||||
"features": null,
|
||||
"image": "quay.io\/parkervcp\/pterodactyl-images:debian_openjdk-8-jre",
|
||||
"startup": "java -Djavax.accessibility.assistive_technologies=\" \" -Dnogui=true -jar JMusicBot.jar",
|
||||
"config": {
|
||||
@ -17,7 +18,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/bash\r\n## this is a simple script to use the github API for release versions.\r\n## this requires the egg has a variable for GITHUB_PACKAGE, VERSION and MATCH (match is to match the filename in some way)\r\n## this supports using oauth\/personal access tokens via GITHUB_USER and GITHUB_OAUTH_TOKEN (both are required.)\r\n## if you are getting hit with GitHub API limit issues then you need to have the user and token set.\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nGITHUB_PACKAGE=\"jagrosh\/MusicBot\"\r\nMATCH=\"Linux\"\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n CONFIG_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i config)\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i config)\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\n CONFIG_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n fi\r\nfi\r\n\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\ncurl -Lo JMusicBot.jar ${DOWNLOAD_LINK}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"config found\"\r\nelse\r\n echo -e \"config not found getting default\"\r\n curl -Lo config.txt ${CONFIG_LINK}\r\nfi\r\n\r\necho \"Job's Done\"",
|
||||
"script": "#!\/bin\/bash\r\n## this is a simple script to use the github API for release versions.\r\n## this requires the egg has a variable for GITHUB_PACKAGE and VERSION\r\n## this supports using oauth\/personal access tokens via GITHUB_USER and GITHUB_OAUTH_TOKEN (both are required.)\r\n## if you are getting hit with GitHub API limit issues then you need to have the user and token set.\r\n\r\napt update\r\napt install -y jq curl\r\n\r\nGITHUB_PACKAGE=\"jagrosh\/MusicBot\"\r\nCONFIG_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/config.txt\"\r\nPLAYLIST_LINK=\"https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/bots\/discord\/jmusicbot\/playlist.txt\"\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"no github user set, using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i config)\r\n else\r\n echo -e \"defaulting to the latest release\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\n[ ! -d \/mnt\/server ] && mkdir \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\nif [ -f JMusicBot.jar ]; then\r\n mv -f JMusicBot.jar JMusicBot.jar-old\r\nfi\r\n\r\ncurl -Lo JMusicBot.jar ${DOWNLOAD_LINK}\r\n\r\nif [ -f config.txt ]; then\r\n echo -e \"config already exists\"\r\nelse\r\n echo -e \"config not found, downloading default config\"\r\n curl -Lo config.txt ${CONFIG_LINK}\r\nfi\r\n\r\nif [ -f playlist.txt ]; then\r\n echo -e \"playlist already exists\"\r\nelse\r\n echo -e \"playlist not found, downloading default playlist\"\r\n curl -Lo playlist.txt ${PLAYLIST_LINK}\r\nfi\r\n\r\necho \"Job's Done\"",
|
||||
"container": "debian:buster-slim",
|
||||
"entrypoint": "\/bin\/bash"
|
||||
}
|
||||
@ -25,29 +26,29 @@
|
||||
"variables": [
|
||||
{
|
||||
"name": "Discord Bot Token",
|
||||
"description": "The token for the discord bot.\r\n\r\nhttps:\/\/discordapp.com\/developers\/applications\/",
|
||||
"description": "The token for your discord bot.\r\n\r\nhttps:\/\/discordapp.com\/developers\/applications\/",
|
||||
"env_variable": "BOT_TOKEN",
|
||||
"default_value": "You need to get a token",
|
||||
"user_viewable": 1,
|
||||
"user_editable": 1,
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:64"
|
||||
},
|
||||
{
|
||||
"name": "Bot Prefix",
|
||||
"description": "Thew prefix for the bot.\r\n\r\nDefault is it @mention the bot.",
|
||||
"description": "The prefix for the bot.\r\n\r\nDefault is to @mention the bot.",
|
||||
"env_variable": "BOT_PREFIX",
|
||||
"default_value": "@mention",
|
||||
"user_viewable": 1,
|
||||
"user_editable": 1,
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:20"
|
||||
},
|
||||
{
|
||||
"name": "Bot Owner ID",
|
||||
"description": "This is the user ID of the bot owner.",
|
||||
"description": "This is the user ID of the bot owner. It's a long numeric ID, such as 4440512350692326306",
|
||||
"env_variable": "BOT_OWNER",
|
||||
"default_value": "changethistoyourdiscordid",
|
||||
"user_viewable": 1,
|
||||
"user_editable": 1,
|
||||
"default_value": "Change This To Your Discord User ID",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:32"
|
||||
}
|
||||
]
|
||||
|
31
bots/discord/jmusicbot/playlist.txt
Normal file
31
bots/discord/jmusicbot/playlist.txt
Normal file
@ -0,0 +1,31 @@
|
||||
# THIS IS AN EXAMPLE PLAYLIST, EDIT TI TO YOUR OWN REQUIREMENTS
|
||||
# jagrosh's playlist
|
||||
# lots of formats are supported, as shown below
|
||||
# JustSomeBots playlist format is supported as well
|
||||
|
||||
# This next line (the word "shuffle" on a comment line) makes it so that the playlist is always shuffled when loaded.
|
||||
|
||||
# shuffle
|
||||
|
||||
|
||||
# examples of searches on youtube
|
||||
ytsearch:juicy fruit williams
|
||||
ytsearch:gorillaz dare audio
|
||||
|
||||
# examples of searches on soundcloud
|
||||
scsearch:lights metrognome
|
||||
|
||||
# examples of specific youtube videos
|
||||
https://www.youtube.com/watch?v=x7ogV49WGco
|
||||
|
||||
# examples of youtube playlists
|
||||
PLUib4KwT0DMJaPgg_nr1ia8FY5JcXksvb
|
||||
|
||||
|
||||
# Lots of formats are supported
|
||||
# #############################
|
||||
# Links (to youtube videos, soundcloud, radio, streams, etc)
|
||||
# Searches (prefixed with ytsearch or scsearch as shown above)
|
||||
# Youtube video or playlist IDs
|
||||
# Youtube playlist links (https://github.com/jagrosh/MusicBot/wiki/Playlists)
|
||||
# Local files (/home/container/music/mysong.mp3)
|
Loading…
Reference in New Issue
Block a user