Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
256 changes: 256 additions & 0 deletions ColabMusicBotNotebook.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# IMPORTANT : When running for the first time click \"Copy to Drive\" to save your changes in Google Drive in order to avoid re-entering the config details again and again"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# download the latest release of the bot\n",
"! curl -s https://api.github.com/repos/jagrosh/MusicBot/releases/latest | grep \"browser_download_url\" | cut -d : -f 2,3 | tr -d \\\" | wget -qi -"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Edit the bot token and discord owner id below and run the cell in this section to update the config file \n",
"- you can alter the config file based on your needs (prefix, etc)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%writefile config.txt\n",
"\n",
"/////////////////////////////////////////////////////////\n",
"// Config for the JMusicBot //\n",
"/////////////////////////////////////////////////////////\n",
"// Any line starting with // is ignored //\n",
"// You MUST set the token and owner //\n",
"// All other items have defaults if you don't set them //\n",
"// Open in Notepad++ for best results //\n",
"/////////////////////////////////////////////////////////\n",
"\n",
"\n",
"// This sets the token for the bot to log in with\n",
"// This MUST be a bot token (user tokens will not work)\n",
"// If you don't know how to get a bot token, please see the guide here:\n",
"// https://github.com/jagrosh/MusicBot/wiki/Getting-a-Bot-Token\n",
"\n",
"token = BOT_TOKEN_HERE\n",
"\n",
"\n",
"// This sets the owner of the bot\n",
"// This needs to be the owner's ID (a 17-18 digit number)\n",
"// https://github.com/jagrosh/MusicBot/wiki/Finding-Your-User-ID\n",
"\n",
"owner = 0\n",
"\n",
"\n",
"// This sets the prefix for the bot\n",
"// The prefix is used to control the commands\n",
"// If you use !!, the play command will be !!play\n",
"// If you do not set this, the prefix will be a mention of the bot (@Botname play)\n",
"\n",
"prefix = \"@mention\"\n",
"\n",
"\n",
"// If you set this, it modifies the default game of the bot\n",
"// Set this to NONE to have no game\n",
"// Set this to DEFAULT to use the default game\n",
"// You can make the game \"Playing X\", \"Listening to X\", or \"Watching X\"\n",
"// where X is the title. If you don't include an action, it will use the\n",
"// default of \"Playing\"\n",
"\n",
"game = \"DEFAULT\"\n",
"\n",
"\n",
"// If you set this, it will modify the default status of bot\n",
"// Valid values: ONLINE IDLE DND INVISIBLE\n",
"\n",
"status = ONLINE\n",
"\n",
"\n",
"// If you set this to true, the bot will list the title of the song it is currently playing in its\n",
"// \"Playing\" status. Note that this will ONLY work if the bot is playing music on ONE guild;\n",
"// if the bot is playing on multiple guilds, this will not work.\n",
"\n",
"songinstatus=false\n",
"\n",
"\n",
"// If you set this, the bot will also use this prefix in addition to\n",
"// the one provided above\n",
"\n",
"altprefix = \"NONE\"\n",
"\n",
"\n",
"// If you set these, it will change the various emojis\n",
"\n",
"success = \"🎶\"\n",
"warning = \"💡\"\n",
"error = \"🚫\"\n",
"loading = \"⌚\"\n",
"searching = \"🔎\"\n",
"\n",
"\n",
"// If you set this, you change the word used to view the help.\n",
"// For example, if you set the prefix to !! and the help to cmds, you would type\n",
"// !!cmds to see the help text\n",
"\n",
"help = help\n",
"\n",
"\n",
"// If you set this, the \"nowplaying\" command will show youtube thumbnails\n",
"// Note: If you set this to true, the nowplaying boxes will NOT refresh\n",
"// This is because refreshing the boxes causes the image to be reloaded\n",
"// every time it refreshes.\n",
"\n",
"npimages = false\n",
"\n",
"\n",
"// If you set this, the bot will not leave a voice channel after it finishes a queue.\n",
"// Keep in mind that being connected to a voice channel uses additional bandwith,\n",
"// so this option is not recommended if bandwidth is a concern.\n",
"\n",
"stayinchannel = false\n",
"\n",
"\n",
"// This sets the maximum amount of seconds any track loaded can be. If not set or set\n",
"// to any number less than or equal to zero, there is no maximum time length. This time\n",
"// restriction applies to songs loaded from any source.\n",
"\n",
"maxtime = 0\n",
"\n",
"// This sets the amount of seconds the bot will stay alone on a voice channel until it\n",
"// automatically leaves the voice channel and clears the queue. If not set or set\n",
"// to any number less than or equal to zero, the bot won't leave when alone.\n",
"\n",
"alonetimeuntilstop = 0\n",
"\n",
"// This sets an alternative folder to be used as the Playlists folder\n",
"// This can be a relative or absolute path\n",
"\n",
"playlistsfolder = \"Playlists\"\n",
"\n",
"\n",
"// By default, the bot will DM the owner if the bot is running and a new version of the bot\n",
"// becomes available. Set this to false to disable this feature.\n",
"\n",
"updatealerts=true\n",
"\n",
"\n",
"// Changing this changes the lyrics provider\n",
"// Currently available providers: \"A-Z Lyrics\", \"Genius\", \"MusicMatch\", \"LyricsFreak\"\n",
"// At the time of writing, I would recommend sticking with A-Z Lyrics or MusicMatch,\n",
"// as Genius tends to have a lot of non-song results and you might get something \n",
"// completely unrelated to what you want.\n",
"// If you are interested in contributing a provider, please see\n",
"// https://github.com/jagrosh/JLyrics\n",
"\n",
"lyrics.default = \"A-Z Lyrics\"\n",
"\n",
"\n",
"// These settings allow you to configure custom aliases for all commands.\n",
"// Multiple aliases may be given, separated by commas.\n",
"//\n",
"// Example 1: Giving command \"play\" the alias \"p\":\n",
"// play = [ p ]\n",
"//\n",
"// Example 2: Giving command \"search\" the aliases \"yts\" and \"find\":\n",
"// search = [ yts, find ]\n",
"\n",
"aliases {\n",
" // General commands\n",
" settings = [ status ]\n",
"\n",
" // Music commands\n",
" lyrics = []\n",
" nowplaying = [ np, current ]\n",
" play = []\n",
" playlists = [ pls ]\n",
" queue = [ list ]\n",
" remove = [ delete ]\n",
" scsearch = []\n",
" search = [ ytsearch ]\n",
" shuffle = []\n",
" skip = [ voteskip ]\n",
"\n",
" // Admin commands\n",
" prefix = [ setprefix ]\n",
" setdj = []\n",
" settc = []\n",
" setvc = []\n",
"\n",
" // DJ Commands\n",
" forceremove = [ forcedelete, modremove, moddelete ]\n",
" forceskip = [ modskip ]\n",
" movetrack = [ move ]\n",
" pause = []\n",
" playnext = []\n",
" repeat = []\n",
" skipto = [ jumpto ]\n",
" stop = []\n",
" volume = [ vol ]\n",
"}\n",
"\n",
"// If you set this to true, it will enable the eval command for the bot owner. This command\n",
"// allows the bot owner to run arbitrary code from the bot's account.\n",
"//\n",
"// WARNING:\n",
"// This command can be extremely dangerous. If you don't know what you're doing, you could\n",
"// cause horrific problems on your Discord server or on whatever computer this bot is running\n",
"// on. Never run this command unless you are completely positive what you are running.\n",
"//\n",
"// DO NOT ENABLE THIS IF YOU DON'T KNOW WHAT THIS DOES OR HOW TO USE IT\n",
"// IF SOMEONE ASKS YOU TO ENABLE THIS, THERE IS AN 11/10 CHANCE THEY ARE TRYING TO SCAM YOU\n",
"\n",
"eval=false"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#run the bot\n",
"!java -Dnogui=true -jar ./JMusicBot-*.jar"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[![CircleCI](https://img.shields.io/circleci/project/github/jagrosh/MusicBot/master.svg)](https://circleci.com/gh/jagrosh/MusicBot)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/gdu6nyte5psj6xfk/branch/master?svg=true)](https://ci.appveyor.com/project/jagrosh/musicbot/branch/master)
[![CodeFactor](https://www.codefactor.io/repository/github/jagrosh/musicbot/badge)](https://www.codefactor.io/repository/github/jagrosh/musicbot)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mritunjaymusale/MusicBot/blob/master/ColabMusicBotNotebook.ipynb)

A cross-platform Discord music bot with a clean interface, and that is easy to set up and run yourself!

Expand Down