This commit is contained in:
Tyler Murphy 2022-08-22 18:21:33 -04:00
parent 2081810bfe
commit 30aa1d0613
4 changed files with 30 additions and 7 deletions

View file

@ -0,0 +1,22 @@
package net.tylermurphy.ken.command.fun;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.Member;
import net.tylermurphy.ken.Ken;
import net.tylermurphy.ken.command.Response;
import net.tylermurphy.ken.util.Command;
public class Coinflip {
@Command(name="coinflip", description="Flip a coin")
public Response execute(Member sender){
boolean flip = Math.random() > .5;
String image = flip ? "coin_heads.png" : "coin_tails.png";
String url = "https://cdn.tylermurphy.net/ken/"+image;
EmbedBuilder builder = Ken.getInstance().getDefaultEmbed()
.setAuthor("Coinflip: " + (flip ? "Heads" : "Tails"), sender.getUser().getAvatarUrl())
.setImage(url);
return Response.success(builder.build());
}
}

View file

@ -51,7 +51,7 @@ public class Dice {
int n = (int)(Math.random()*sides)+1;
String url = "https://cdn.tylermurphy.net/ken/"+sided+"_"+n+".png";
EmbedBuilder builder = Ken.getInstance().getDefaultEmbed()
.setAuthor("d"+sides+" - Rolled a "+n, sender.getAvatarUrl())
.setAuthor("d"+sides+" - Rolled a "+n, sender.getUser().getAvatarUrl())
.setImage(url);
return Response.success(builder.build());
}

View file

@ -39,20 +39,20 @@ public class Help {
String supportServer = Ken.getInstance().getConfig().getString("supportServer");
EmbedBuilder[] embeds = new EmbedBuilder[]{
Ken.getInstance().getDefaultEmbed()
.setAuthor(name + " Command List", sender.getAvatarUrl())
.setAuthor(name + " Command List", sender.getUser().getAvatarUrl())
.appendDescription(
"These are all the commands that are included with "+name+"\n" +
"Read below to see what each command does, and what parameters the\n" +
"command requires. Any questions? Join our [discord support server](https://discord.gg/"+supportServer+")"
).setFooter("Page "+page+"/"+PAGES),
Ken.getInstance().getDefaultEmbed()
.setAuthor(name + " Command List", sender.getAvatarUrl())
.setAuthor(name + " Command List", sender.getUser().getAvatarUrl())
.setTitle(":pen_ballpoint: **Main Commands**")
.appendDescription("**/help** Gives a list of commands\n")
.appendDescription("**/purge <amount>** Purges an amount of messages from a channel\n")
.setFooter("Page "+page+"/"+PAGES),
Ken.getInstance().getDefaultEmbed()
.setAuthor(name + " Command List", sender.getAvatarUrl())
.setAuthor(name + " Command List", sender.getUser().getAvatarUrl())
.setTitle(":musical_note: **Music Commands**")
.appendDescription("**/play <query>** Plays a song in a voice channel\n")
.appendDescription("**/join** Make the bot join your audio channel\n")
@ -69,7 +69,7 @@ public class Help {
.appendDescription("**/queue** View the current song queue\n")
.setFooter("Page "+page+"/"+PAGES),
Ken.getInstance().getDefaultEmbed()
.setAuthor(name + " Command List", sender.getAvatarUrl())
.setAuthor(name + " Command List", sender.getUser().getAvatarUrl())
.setTitle(":game_die: **Game Commands**")
.appendDescription("**/d6** Roll a d6 die\n")
.appendDescription("**/d8** Roll a d8 die\n")
@ -78,10 +78,11 @@ public class Help {
.appendDescription("**/dice <sides>** Roll a dice with set sides\n")
.setFooter("Page "+page+"/"+PAGES),
Ken.getInstance().getDefaultEmbed()
.setAuthor(name + " Command List", sender.getAvatarUrl())
.setAuthor(name + " Command List", sender.getUser().getAvatarUrl())
.setTitle(":underage: **NSFW Commands**")
.appendDescription("**/rule34 <query>** Search on rule34\n")
.appendDescription("**/e612 <query>** Search on e621\n")
.appendDescription("**/akaneko <query>** Search on akaneko\n")
.setFooter("Page "+page+"/"+PAGES)
};
return embeds[page-1].build();

View file

@ -17,7 +17,7 @@ import java.util.List;
public class Akaneko {
@Command(name="akaneko", description=":underage: Searches for an image off of akaneko")
@Selection(name="type", description="Type of post you want to get", type=OptionType.STRING, required=true, choices={"ass","bdsm","cum","hentai","femdom","doujin","maid","orgy","panties","nsfwwallpapers","nsfwmobilewallpapers","netorare","gifs","gif","blowjob","feet","pussy","uglybastard","uniform","gangbang","foxgirl","cumslut","glasses","thighs","tentacles","masturbation","school","yuri","succubus"})
@Selection(name="query", description="Type of post you want to get", type=OptionType.STRING, required=true, choices={"ass","bdsm","cum","hentai","femdom","doujin","maid","orgy","nsfwwallpapers","nsfwmobilewallpapers","gif","blowjob","feet","pussy","uglybastard","gangbang","cumslut","glasses","thighs","tentacles","masturbation","school","yuri","succubus"})
public Response execute(GuildMessageChannel channel, List<Object> args){
if(!(channel instanceof TextChannel)) {
return Response.error("This command can only be used in a text channel");