Update references to main class.

jda-v5
Nekojimi 2 years ago
parent 1b7d4adeb9
commit 6f23b60511
  1. 6
      src/main/java/moe/nekojimi/chords/MusicHandler.java
  2. 6
      src/main/java/moe/nekojimi/chords/commands/Command.java
  3. 4
      src/main/java/moe/nekojimi/chords/commands/HelpCommand.java
  4. 4
      src/main/java/moe/nekojimi/chords/commands/JoinCommand.java
  5. 4
      src/main/java/moe/nekojimi/chords/commands/LeaveCommand.java
  6. 4
      src/main/java/moe/nekojimi/chords/commands/PlayCommand.java
  7. 4
      src/main/java/moe/nekojimi/chords/commands/QueueCommand.java
  8. 4
      src/main/java/moe/nekojimi/chords/commands/RemoveCommand.java
  9. 4
      src/main/java/moe/nekojimi/chords/commands/RestartCommand.java
  10. 4
      src/main/java/moe/nekojimi/chords/commands/SkipCommand.java

@ -112,7 +112,7 @@ public class MusicHandler implements AudioSendHandler, Closeable
return true; return true;
} catch (UnsupportedAudioFileException | IOException ex) } catch (UnsupportedAudioFileException | IOException ex)
{ {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(Chords.class.getName()).log(Level.SEVERE, null, ex);
} finally } finally
{ {
} }
@ -215,7 +215,7 @@ public class MusicHandler implements AudioSendHandler, Closeable
// audioBuffer.add(bytes, 0, read); // audioBuffer.add(bytes, 0, read);
// } catch (IOException ex) // } catch (IOException ex)
// { // {
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); // Logger.getLogger(Chords.class.getName()).log(Level.SEVERE, null, ex);
// return false; // return false;
// } catch (ArrayIndexOutOfBoundsException ex) // } catch (ArrayIndexOutOfBoundsException ex)
// { // {
@ -223,7 +223,7 @@ public class MusicHandler implements AudioSendHandler, Closeable
// arrayErr = true; // arrayErr = true;
// else // else
// { // {
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); // Logger.getLogger(Chords.class.getName()).log(Level.SEVERE, null, ex);
// return false; // return false;
// } // }
// } // }

@ -5,7 +5,7 @@
*/ */
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
/** /**
* *
@ -14,11 +14,11 @@ import moe.nekojimi.chords.Main;
public abstract class Command public abstract class Command
{ {
protected final Main bot; protected final Chords bot;
protected final String keyword; protected final String keyword;
protected String documentation; protected String documentation;
public Command(Main bot, String keyword) public Command(Chords bot, String keyword)
{ {
this.bot = bot; this.bot = bot;
this.keyword = keyword; this.keyword = keyword;

@ -16,12 +16,12 @@
*/ */
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
public class HelpCommand extends Command public class HelpCommand extends Command
{ {
public HelpCommand(Main bot) public HelpCommand(Chords bot)
{ {
super(bot, "help"); super(bot, "help");
} }

@ -6,14 +6,14 @@
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import java.util.List; import java.util.List;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
import net.dv8tion.jda.api.entities.*; import net.dv8tion.jda.api.entities.*;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent; import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public class JoinCommand extends Command public class JoinCommand extends Command
{ {
public JoinCommand(Main bot) public JoinCommand(Chords bot)
{ {
super(bot, "join"); super(bot, "join");
} }

@ -6,13 +6,13 @@
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import java.util.List; import java.util.List;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent; import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public class LeaveCommand extends Command public class LeaveCommand extends Command
{ {
public LeaveCommand(Main bot) public LeaveCommand(Chords bot)
{ {
super(bot, "leave"); super(bot, "leave");
} }

@ -21,7 +21,7 @@ import java.net.URL;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
import moe.nekojimi.chords.SongRequest; import moe.nekojimi.chords.SongRequest;
import moe.nekojimi.musicsearcher.Query; import moe.nekojimi.musicsearcher.Query;
import moe.nekojimi.musicsearcher.Result; import moe.nekojimi.musicsearcher.Result;
@ -37,7 +37,7 @@ public class PlayCommand extends Command
// private List<Result> lastSearchResults; // private List<Result> lastSearchResults;
public PlayCommand(Main main) public PlayCommand(Chords main)
{ {
super(main, "play"); super(main, "play");
} }

@ -19,13 +19,13 @@ package moe.nekojimi.chords.commands;
import java.util.List; import java.util.List;
import java.util.Queue; import java.util.Queue;
import moe.nekojimi.chords.Downloader; import moe.nekojimi.chords.Downloader;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
import moe.nekojimi.chords.Song; import moe.nekojimi.chords.Song;
public class QueueCommand extends Command public class QueueCommand extends Command
{ {
public QueueCommand(Main bot) public QueueCommand(Chords bot)
{ {
super(bot, "queue"); super(bot, "queue");
} }

@ -16,12 +16,12 @@
*/ */
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
public class RemoveCommand extends Command public class RemoveCommand extends Command
{ {
public RemoveCommand(Main bot) public RemoveCommand(Chords bot)
{ {
super(bot, "remove"); super(bot, "remove");
} }

@ -16,12 +16,12 @@
*/ */
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
public class RestartCommand extends Command public class RestartCommand extends Command
{ {
public RestartCommand(Main bot) public RestartCommand(Chords bot)
{ {
super(bot, "restart"); super(bot, "restart");
} }

@ -16,12 +16,12 @@
*/ */
package moe.nekojimi.chords.commands; package moe.nekojimi.chords.commands;
import moe.nekojimi.chords.Main; import moe.nekojimi.chords.Chords;
public class SkipCommand extends Command public class SkipCommand extends Command
{ {
public SkipCommand(Main bot) public SkipCommand(Chords bot)
{ {
super(bot, "skip"); super(bot, "skip");
} }

Loading…
Cancel
Save