Skip to content

Commit

Permalink
updated package name
Browse files Browse the repository at this point in the history
fixed soundcloud search url bug
fixed playlist permission bug
added info to playlists command
bumped versions
  • Loading branch information
jagrosh committed Apr 25, 2017
1 parent 61c6203 commit 0f52bbd
Show file tree
Hide file tree
Showing 41 changed files with 173 additions and 166 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A Discord music bot with a clean interface, and that is easy to set up and run y
* Clean and beautiful menus
* Channel-topic playback bar
* Supports many sites, including Youtube, Soundcloud, and more
* Playlist support
* Playlist support (both web/youtube, and local)

# Setup
Please see the [Setup Page](https://github.com/jagrosh/MusicBot/wiki/Setup) in the wiki to run this bot yourself!
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.jagrosh</groupId>
<groupId>com.jagrosh</groupId>
<artifactId>JMusicBot</artifactId>
<version>0.0.3</version>
<version>0.0.4</version>
<packaging>jar</packaging>

<repositories>
Expand All @@ -23,17 +23,17 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>3.0.0_162</version>
<version>3.0.0_168</version>
</dependency>
<dependency>
<groupId>com.sedmelluq</groupId>
<artifactId>lavaplayer</artifactId>
<version>1.2.34</version>
<version>1.2.36</version>
</dependency>
<dependency>
<groupId>me.jagrosh</groupId>
<groupId>com.jagrosh</groupId>
<artifactId>JDA-Utilities</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
Expand All @@ -52,7 +52,7 @@
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>me.jagrosh.jmusicbot.JMusicBot</mainClass>
<mainClass>com.jagrosh.jmusicbot.JMusicBot</mainClass>
</manifest>
</archive>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot;
package com.jagrosh.jmusicbot;

import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayerManager;
Expand All @@ -27,12 +27,12 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import me.jagrosh.jdautilities.commandclient.Command.Category;
import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jdautilities.waiter.EventWaiter;
import me.jagrosh.jmusicbot.audio.AudioHandler;
import me.jagrosh.jmusicbot.gui.GUI;
import me.jagrosh.jmusicbot.utils.FormatUtil;
import com.jagrosh.jdautilities.commandclient.Command.Category;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jdautilities.waiter.EventWaiter;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.gui.GUI;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.Guild;
Expand Down Expand Up @@ -152,7 +152,7 @@ private void updateTopic(Guild guild, AudioHandler handler)
{
String otherText;
if(tchan.getTopic()==null || tchan.getTopic().isEmpty())
otherText = "";
otherText = "\u200B";
else if(tchan.getTopic().contains("\u200B"))
otherText = tchan.getTopic().substring(tchan.getTopic().indexOf("\u200B"));
else
Expand Down Expand Up @@ -293,7 +293,7 @@ public void setVolume(Guild guild, int volume)
public void clearTextChannel(Guild guild)
{
Settings s = getSettings(guild);
if(s!=null)
if(s!=Settings.DEFAULT_SETTINGS)
{
if(s.getVoiceId()==null && s.getRoleId()==null)
settings.remove(guild.getId());
Expand All @@ -306,7 +306,7 @@ public void clearTextChannel(Guild guild)
public void clearVoiceChannel(Guild guild)
{
Settings s = getSettings(guild);
if(s!=null)
if(s!=Settings.DEFAULT_SETTINGS)
{
if(s.getTextId()==null && s.getRoleId()==null)
settings.remove(guild.getId());
Expand All @@ -319,7 +319,7 @@ public void clearVoiceChannel(Guild guild)
public void clearRole(Guild guild)
{
Settings s = getSettings(guild);
if(s!=null)
if(s!=Settings.DEFAULT_SETTINGS)
{
if(s.getVoiceId()==null && s.getTextId()==null)
settings.remove(guild.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot;
package com.jagrosh.jmusicbot;

import java.io.IOException;
import java.nio.file.Files;
Expand Down Expand Up @@ -124,7 +124,8 @@ public Config(boolean nogui)
try {
Files.write(Paths.get("config.txt"), builder.toString().trim().getBytes());
} catch(IOException ex) {
alert("Failed to write new config options to config.txt: "+ex);
alert("Failed to write new config options to config.txt: "+ex
+ "\nPlease make sure that the files are not on your desktop or some other restricted area.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot;
package com.jagrosh.jmusicbot;

import java.awt.Color;
import javax.security.auth.login.LoginException;
import me.jagrosh.jdautilities.commandclient.CommandClient;
import me.jagrosh.jdautilities.commandclient.CommandClientBuilder;
import me.jagrosh.jdautilities.commandclient.examples.*;
import me.jagrosh.jdautilities.waiter.EventWaiter;
import me.jagrosh.jmusicbot.commands.*;
import me.jagrosh.jmusicbot.gui.GUI;
import com.jagrosh.jdautilities.commandclient.CommandClient;
import com.jagrosh.jdautilities.commandclient.CommandClientBuilder;
import com.jagrosh.jdautilities.commandclient.examples.*;
import com.jagrosh.jdautilities.waiter.EventWaiter;
import com.jagrosh.jmusicbot.commands.*;
import com.jagrosh.jmusicbot.gui.GUI;
import net.dv8tion.jda.core.AccountType;
import net.dv8tion.jda.core.JDABuilder;
import net.dv8tion.jda.core.OnlineStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot;
package com.jagrosh.jmusicbot;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.audio;
package com.jagrosh.jmusicbot.audio;

import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter;
Expand All @@ -24,9 +24,9 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.playlist.Playlist;
import me.jagrosh.jmusicbot.queue.FairQueue;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;
import com.jagrosh.jmusicbot.queue.FairQueue;
import net.dv8tion.jda.core.audio.AudioSendHandler;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.User;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.audio;
package com.jagrosh.jmusicbot.audio;

import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import me.jagrosh.jmusicbot.queue.Queueable;
import me.jagrosh.jmusicbot.utils.FormatUtil;
import com.jagrosh.jmusicbot.queue.Queueable;
import com.jagrosh.jmusicbot.utils.FormatUtil;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.User;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import me.jagrosh.jdautilities.commandclient.Command;
import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.Settings;
import me.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.Settings;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import net.dv8tion.jda.core.entities.GuildVoiceState;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.VoiceChannel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.audio.AudioHandler;
import me.jagrosh.jmusicbot.utils.FormatUtil;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.audio.AudioHandler;
import com.jagrosh.jmusicbot.utils.FormatUtil;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import me.jagrosh.jdautilities.commandclient.Command;
import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.playlist.Playlist;
import me.jagrosh.jmusicbot.utils.FormatUtil;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import net.dv8tion.jda.core.entities.Message;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;
import me.jagrosh.jdautilities.commandclient.Command;
import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.playlist.Playlist;
import com.jagrosh.jdautilities.commandclient.Command;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;

/**
*
Expand Down Expand Up @@ -55,7 +55,7 @@ public void execute(CommandEvent event) {
StringBuilder builder = new StringBuilder(event.getClient().getWarning()+" Playlist Management Commands:\n");
for(Command cmd: this.children)
builder.append("\n`").append(event.getClient().getPrefix()).append(name).append(" ").append(cmd.getName())
.append(" ").append(cmd.getArguments()).append("` - ").append(cmd.getHelp());
.append(" ").append(cmd.getArguments()==null ? "" : cmd.getArguments()).append("` - ").append(cmd.getHelp());
event.reply(builder.toString());
}

Expand All @@ -68,6 +68,7 @@ public MakelistCmd()
this.help = "makes a new playlist";
this.arguments = "<name>";
this.category = bot.OWNER;
this.ownerCommand = true;
this.guildOnly = false;
}

Expand Down Expand Up @@ -100,6 +101,7 @@ public DeletelistCmd()
this.help = "deletes an existing playlist";
this.arguments = "<name>";
this.guildOnly = false;
this.ownerCommand = true;
this.category = bot.OWNER;
}

Expand Down Expand Up @@ -132,6 +134,7 @@ public AppendlistCmd()
this.help = "appends songs to an existing playlist";
this.arguments = "<name> <URL> | <URL> | ...";
this.guildOnly = false;
this.ownerCommand = true;
this.category = bot.OWNER;
}

Expand Down Expand Up @@ -181,6 +184,7 @@ public DefaultlistCmd()
this.help = "sets the default playlist for the server";
this.arguments = "<playlistname|NONE>";
this.guildOnly = true;
this.ownerCommand = true;
this.category = bot.OWNER;
}

Expand Down Expand Up @@ -217,6 +221,7 @@ public ListCmd()
this.aliases = new String[]{"available","list"};
this.help = "lists all available playlists";
this.guildOnly = true;
this.ownerCommand = true;
this.category = bot.OWNER;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.jagrosh.jmusicbot.commands;
package com.jagrosh.jmusicbot.commands;

import java.util.List;
import me.jagrosh.jdautilities.commandclient.CommandEvent;
import me.jagrosh.jmusicbot.Bot;
import me.jagrosh.jmusicbot.playlist.Playlist;
import com.jagrosh.jdautilities.commandclient.CommandEvent;
import com.jagrosh.jmusicbot.Bot;
import com.jagrosh.jmusicbot.playlist.Playlist;

/**
*
Expand Down Expand Up @@ -55,6 +55,7 @@ else if(list.isEmpty())
{
StringBuilder builder = new StringBuilder(event.getClient().getSuccess()+" Available playlists:\n");
list.forEach(str -> builder.append("`").append(str).append("` "));
builder.append("\nType `").append(event.getClient().getTextualPrefix()).append("play playlist <name>` to play a playlist");
event.reply(builder.toString());
}
}
Expand Down
Loading

0 comments on commit 0f52bbd

Please sign in to comment.