Auto stash before merge of "master" and "origin/master"
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
"Localized Commands","dbstats",""
|
"Localized Commands","dbstats",""
|
||||||
"Localized Commands","defaultdance",""
|
"Localized Commands","defaultdance",""
|
||||||
"Localized Commands","derp",""
|
"Localized Commands","derp",""
|
||||||
|
"Localized Commands","derpi",""
|
||||||
|
"Localized Commands","e6",""
|
||||||
"Localized Commands","e621",""
|
"Localized Commands","e621",""
|
||||||
"Localized Commands","eightball, 8ball",""
|
"Localized Commands","eightball, 8ball",""
|
||||||
"Localized Commands","fetch",""
|
"Localized Commands","fetch",""
|
||||||
@@ -48,6 +50,7 @@
|
|||||||
"Localized Commands","stats",""
|
"Localized Commands","stats",""
|
||||||
"Localized Commands","teey",""
|
"Localized Commands","teey",""
|
||||||
"Localized Commands","tony, stark, dontfeelgood, dontfeelsogood","tony, stark, dontfeelgood, dontfeelsogood, snap"
|
"Localized Commands","tony, stark, dontfeelgood, dontfeelsogood","tony, stark, dontfeelgood, dontfeelsogood, snap"
|
||||||
|
"Localized Commands","tradebeans",""
|
||||||
"Localized Commands","tweet",""
|
"Localized Commands","tweet",""
|
||||||
"Localized Commands","vote",""
|
"Localized Commands","vote",""
|
||||||
"Localized Commands","wolfram",""
|
"Localized Commands","wolfram",""
|
||||||
@@ -110,8 +113,10 @@
|
|||||||
"Localized Strings","DBFlushInfo","Takes all objects queued for the database and writes them to the database, then says how many were written."
|
"Localized Strings","DBFlushInfo","Takes all objects queued for the database and writes them to the database, then says how many were written."
|
||||||
"Localized Strings","DBStatsInfo","Shows current statistics for the database"
|
"Localized Strings","DBStatsInfo","Shows current statistics for the database"
|
||||||
"Localized Strings","DefaultDanceInfo","y'all know forknife, get ready to dance, or make a friend dance with @!"
|
"Localized Strings","DefaultDanceInfo","y'all know forknife, get ready to dance, or make a friend dance with @!"
|
||||||
|
"Localized Strings","DerpiError",""
|
||||||
"Localized Strings","DoWorkFinished","I finished with my work! :D"
|
"Localized Strings","DoWorkFinished","I finished with my work! :D"
|
||||||
"Localized Strings","DoWorkInfo","Occupies a core for a few seconds"
|
"Localized Strings","DoWorkInfo","Occupies a core for a few seconds"
|
||||||
|
"Localized Strings","E6Blacklisted","I can't show that image ;3; (it may be blacklisted)"
|
||||||
"Localized Strings","EightBallError","Hmm? You'll need to ask a question!"
|
"Localized Strings","EightBallError","Hmm? You'll need to ask a question!"
|
||||||
"Localized Strings","EightBallInfo","Answers a yes or no question! Warning: Kitty can not actually tell the future, she claims no responsibility for any lion mauling, lack of lottery wins, or felony charges."
|
"Localized Strings","EightBallInfo","Answers a yes or no question! Warning: Kitty can not actually tell the future, she claims no responsibility for any lion mauling, lack of lottery wins, or felony charges."
|
||||||
"Localized Strings","EightBallMaybe1","Reply hazy, try again."
|
"Localized Strings","EightBallMaybe1","Reply hazy, try again."
|
||||||
@@ -182,7 +187,10 @@
|
|||||||
"Localized Strings","MapVersion","Using mapgen v0.1"
|
"Localized Strings","MapVersion","Using mapgen v0.1"
|
||||||
"Localized Strings","MapWidth",""
|
"Localized Strings","MapWidth",""
|
||||||
"Localized Strings","ModInfo","Mod is a super command for admin or mod use only!\n\t`mod ban @user` will ban a user from the server\n\t`mod kick @user` will kick the user from the server"
|
"Localized Strings","ModInfo","Mod is a super command for admin or mod use only!\n\t`mod ban @user` will ban a user from the server\n\t`mod kick @user` will kick the user from the server"
|
||||||
|
"Localized Strings","MusicAddTrack",""
|
||||||
"Localized Strings","MusicInfo",""
|
"Localized Strings","MusicInfo",""
|
||||||
|
"Localized Strings","MusicVolChanged","Volume set to %s!"
|
||||||
|
"Localized Strings","MusicVolCurrent","Volume is at %s!"
|
||||||
"Localized Strings","PerishInfo","Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned"
|
"Localized Strings","PerishInfo","Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned"
|
||||||
"Localized Strings","PingInfo","Will respond with Pong!"
|
"Localized Strings","PingInfo","Will respond with Pong!"
|
||||||
"Localized Strings","PingResponse","Pong!"
|
"Localized Strings","PingResponse","Pong!"
|
||||||
@@ -271,6 +279,8 @@
|
|||||||
"Command Enabler","dbstats","1"
|
"Command Enabler","dbstats","1"
|
||||||
"Command Enabler","defaultdance","1"
|
"Command Enabler","defaultdance","1"
|
||||||
"Command Enabler","derp","1"
|
"Command Enabler","derp","1"
|
||||||
|
"Command Enabler","derpi","1"
|
||||||
|
"Command Enabler","e6","1"
|
||||||
"Command Enabler","e621","1"
|
"Command Enabler","e621","1"
|
||||||
"Command Enabler","eightball, 8ball","1"
|
"Command Enabler","eightball, 8ball","1"
|
||||||
"Command Enabler","fetch","1"
|
"Command Enabler","fetch","1"
|
||||||
@@ -313,6 +323,7 @@
|
|||||||
"Command Enabler","stats","1"
|
"Command Enabler","stats","1"
|
||||||
"Command Enabler","teey","1"
|
"Command Enabler","teey","1"
|
||||||
"Command Enabler","tony, stark, dontfeelgood, dontfeelsogood","1"
|
"Command Enabler","tony, stark, dontfeelgood, dontfeelsogood","1"
|
||||||
|
"Command Enabler","tradebeans","1"
|
||||||
"Command Enabler","tweet","1"
|
"Command Enabler","tweet","1"
|
||||||
"Command Enabler","vote","1"
|
"Command Enabler","vote","1"
|
||||||
"Command Enabler","wolfram","1"
|
"Command Enabler","wolfram","1"
|
||||||
|
|||||||
|
@@ -20,7 +20,7 @@ public class CommandBetBeans extends Command
|
|||||||
{
|
{
|
||||||
String call = "";
|
String call = "";
|
||||||
|
|
||||||
int min = 50;
|
int min = 20;
|
||||||
int bet = 0;
|
int bet = 0;
|
||||||
int win = 0;
|
int win = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public class CommandE6 extends Command
|
|||||||
{
|
{
|
||||||
NetworkE6 searcher = new NetworkE6();
|
NetworkE6 searcher = new NetworkE6();
|
||||||
KittyEmbed response;
|
KittyEmbed response;
|
||||||
|
GenericImage image;
|
||||||
|
|
||||||
public CommandE6(KittyRole level, KittyRating rating) { super(level, rating); }
|
public CommandE6(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||||
|
|
||||||
@@ -29,9 +30,24 @@ public class CommandE6 extends Command
|
|||||||
{
|
{
|
||||||
res.send("This channel is SFW only! Have some (probably) wholesome content ^^~");
|
res.send("This channel is SFW only! Have some (probably) wholesome content ^^~");
|
||||||
}
|
}
|
||||||
response = searcher.getE6(input.args + " rating:safe").output();
|
|
||||||
|
image = searcher.getE6(input.args + " rating:safe");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
response = image.output();
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
res.send(LocStrings.stub("E6Blacklisted"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if(response.authorText == null)
|
||||||
|
{
|
||||||
|
Exception e = new Exception();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
res.send(response);
|
res.send(response);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class CommandMusicMain extends Command
|
|||||||
framework.addCommand("skip", new SubCommandSkip(KittyRole.General, KittyRating.Safe));
|
framework.addCommand("skip", new SubCommandSkip(KittyRole.General, KittyRating.Safe));
|
||||||
framework.addCommand("stop", new SubCommandStop(KittyRole.General, KittyRating.Safe));
|
framework.addCommand("stop", new SubCommandStop(KittyRole.General, KittyRating.Safe));
|
||||||
framework.addCommand("playlist", new SubCommandPlaylist(KittyRole.General, KittyRating.Safe));
|
framework.addCommand("playlist", new SubCommandPlaylist(KittyRole.General, KittyRating.Safe));
|
||||||
|
framework.addCommand("volume", new SubCommandVolume(KittyRole.General, KittyRating.Safe));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package commands.music;
|
package commands.music;
|
||||||
|
|
||||||
|
import core.LocStrings;
|
||||||
import core.SubCommand;
|
import core.SubCommand;
|
||||||
import core.SubCommandFormattable;
|
import core.SubCommandFormattable;
|
||||||
import dataStructures.KittyChannel;
|
import dataStructures.KittyChannel;
|
||||||
@@ -27,6 +28,6 @@ public class SubCommandAddTrack extends SubCommand
|
|||||||
video = YT.getYT(video);
|
video = YT.getYT(video);
|
||||||
}
|
}
|
||||||
guild.audio.playVideo(video);
|
guild.audio.playVideo(video);
|
||||||
return new SubCommandFormattable(video);
|
return new SubCommandFormattable(String.format(LocStrings.stub("MusicAddTrack"), video));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package commands.music;
|
||||||
|
|
||||||
|
import core.LocStrings;
|
||||||
|
import core.SubCommand;
|
||||||
|
import core.SubCommandFormattable;
|
||||||
|
import dataStructures.KittyChannel;
|
||||||
|
import dataStructures.KittyGuild;
|
||||||
|
import dataStructures.KittyRating;
|
||||||
|
import dataStructures.KittyRole;
|
||||||
|
import dataStructures.KittyUser;
|
||||||
|
import dataStructures.UserInput;
|
||||||
|
|
||||||
|
public class SubCommandVolume extends SubCommand
|
||||||
|
{
|
||||||
|
public SubCommandVolume(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input)
|
||||||
|
{
|
||||||
|
int newVol = guild.audio.getVolume(guild.audio.player);
|
||||||
|
if(input.args != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
newVol = Integer.parseInt(input.args);
|
||||||
|
if(newVol > 100 || newVol <1)
|
||||||
|
{
|
||||||
|
return new SubCommandFormattable(String.format(LocStrings.stub("MusicVolOOB")));
|
||||||
|
}
|
||||||
|
guild.audio.changeVolume(guild.audio.player, newVol);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
return new SubCommandFormattable(String.format(LocStrings.stub("MusicVolCurrent"), newVol));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return new SubCommandFormattable(String.format(LocStrings.stub("MusicVolChanged"), newVol));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -108,6 +108,7 @@ public class CommandManager
|
|||||||
this.register(LocCommands.stub("music"), new CommandMusicMain(KittyRole.General, KittyRating.Safe));
|
this.register(LocCommands.stub("music"), new CommandMusicMain(KittyRole.General, KittyRating.Safe));
|
||||||
this.register(LocCommands.stub("defaultdance"), new CommandDefaultDance(KittyRole.General, KittyRating.Safe));
|
this.register(LocCommands.stub("defaultdance"), new CommandDefaultDance(KittyRole.General, KittyRating.Safe));
|
||||||
this.register(LocCommands.stub("getsauce"), new CommandGetSauce(KittyRole.General, KittyRating.Safe));
|
this.register(LocCommands.stub("getsauce"), new CommandGetSauce(KittyRole.General, KittyRating.Safe));
|
||||||
|
this.register(LocCommands.stub("tradebeans"), new CommandTradeBeans(KittyRole.General, KittyRating.Safe));
|
||||||
|
|
||||||
this.register(LocCommands.stub("e6"), new CommandE6(KittyRole.General, KittyRating.Filtered));
|
this.register(LocCommands.stub("e6"), new CommandE6(KittyRole.General, KittyRating.Filtered));
|
||||||
this.register(LocCommands.stub("derpi"), new CommandDerpi(KittyRole.General, KittyRating.Filtered));
|
this.register(LocCommands.stub("derpi"), new CommandDerpi(KittyRole.General, KittyRating.Filtered));
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ public class ObjectBuilderFactory
|
|||||||
// Determine token based on config. Default to test token.
|
// Determine token based on config. Default to test token.
|
||||||
String tokenToUse = Ref.TestToken;
|
String tokenToUse = Ref.TestToken;
|
||||||
if(ConfigGlobals.getStartupMode() == KittyStartupMode.Release)
|
if(ConfigGlobals.getStartupMode() == KittyStartupMode.Release)
|
||||||
tokenToUse = Ref.Token;
|
tokenToUse = Ref.PoguToken;
|
||||||
|
|
||||||
// Construct bot based on token
|
// Construct bot based on token
|
||||||
kitty = new JDABuilder(AccountType.BOT)
|
kitty = new JDABuilder(AccountType.BOT)
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class KittyGuild extends DatabaseTrackedObject
|
|||||||
{
|
{
|
||||||
if(!raffleUsersChosen.contains(user) && !raffleUsersUnchosen.contains(user) && user.getBeans() > raffleCost && raffling)
|
if(!raffleUsersChosen.contains(user) && !raffleUsersUnchosen.contains(user) && user.getBeans() > raffleCost && raffling)
|
||||||
{
|
{
|
||||||
user.changeBeans(raffleCost);
|
user.changeBeans(-raffleCost);
|
||||||
raffleUsersUnchosen.add(user);
|
raffleUsersUnchosen.add(user);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,16 @@ public class AudioUtils
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getVolume(AudioPlayer player)
|
||||||
|
{
|
||||||
|
return player.getVolume();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void changeVolume(AudioPlayer player, int newVol)
|
||||||
|
{
|
||||||
|
player.setVolume(newVol);
|
||||||
|
}
|
||||||
|
|
||||||
public String skipVideo(AudioPlayer player)
|
public String skipVideo(AudioPlayer player)
|
||||||
{
|
{
|
||||||
player.stopTrack();
|
player.stopTrack();
|
||||||
@@ -152,6 +162,9 @@ class MusicController extends Thread
|
|||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
} catch (InterruptedException e) {}
|
||||||
AudioTrack nowPlaying = null;
|
AudioTrack nowPlaying = null;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user