Update info command

info command now has top.gg url
This commit is contained in:
PocketMars
2020-06-30 15:19:14 -05:00
parent 72cf1e742c
commit 77c219434c
+7 -6
View File
@@ -27,10 +27,9 @@ public class Commands extends ListenerAdapter {
Bot.prefixes.remove(event.getGuild()); Bot.prefixes.remove(event.getGuild());
} }
} }
public void onGuildMessageReceived(GuildMessageReceivedEvent event) public void onGuildMessageReceived(GuildMessageReceivedEvent event) {
{
if (event.getAuthor().isBot() && event.getMessage().getEmbeds().get(0).getTitle().charAt(0) == 'L') if (event.getAuthor().isBot() && event.getMessage().getEmbeds().get(0).getTitle().charAt(0) == 'L') {
{
event.getMessage().addReaction("U+2B05").queue(); event.getMessage().addReaction("U+2B05").queue();
event.getMessage().addReaction("U+27A1").queue(); event.getMessage().addReaction("U+27A1").queue();
event.getMessage().addReaction("U+2B06").queue(); event.getMessage().addReaction("U+2B06").queue();
@@ -44,6 +43,7 @@ public class Commands extends ListenerAdapter {
} }
String[] args = event.getMessage().getContentRaw().split("\\s+"); String[] args = event.getMessage().getContentRaw().split("\\s+");
if (args[0].toLowerCase().equals(Bot.getPrefix(event.getGuild()) + "prefix")) if (args[0].toLowerCase().equals(Bot.getPrefix(event.getGuild()) + "prefix"))
{ {
if (event.getMember().hasPermission(Permission.ADMINISTRATOR)) { if (event.getMember().hasPermission(Permission.ADMINISTRATOR)) {
@@ -92,7 +92,8 @@ public class Commands extends ListenerAdapter {
event.getMessage().delete().queue(); event.getMessage().delete().queue();
} }
} }
public void onGuildMessageReactionAdd(GuildMessageReactionAddEvent event) { public void onGuildMessageReactionAdd(GuildMessageReactionAddEvent event)
{
if (event.getMember().getUser().isBot()) if (event.getMember().getUser().isBot())
{ {
return; return;
@@ -139,7 +140,7 @@ public class Commands extends ListenerAdapter {
info.addField("How to Play", "You are a **Sokoban** :flushed:.\nYour job is to push **boxes** :brown_square: on top of their **destinations** :negative_squared_cross_mark:.", false); info.addField("How to Play", "You are a **Sokoban** :flushed:.\nYour job is to push **boxes** :brown_square: on top of their **destinations** :negative_squared_cross_mark:.", false);
info.addField("Features", ":white_small_square:**Infinite levels**\nThe maps in Sokobot are randomly generated, increasing in difficulty as you progress.\n:white_small_square:**Varied controls**\nSokobot has multiple control options to improve the player's experience, including reactions and wasd commands!\n:white_small_square:**Simultaneous games**\nThanks to the power of Java HashMaps:tm:, multiple users can use the bot at the same time without interfering with one another.\n:white_small_square:**Custom prefixes**\nTo prevent Sokobot from conflicting with other bots, admins can choose any single-character prefix to preface Sokobot's commands.", false); info.addField("Features", ":white_small_square:**Infinite levels**\nThe maps in Sokobot are randomly generated, increasing in difficulty as you progress.\n:white_small_square:**Varied controls**\nSokobot has multiple control options to improve the player's experience, including reactions and wasd commands!\n:white_small_square:**Simultaneous games**\nThanks to the power of Java HashMaps:tm:, multiple users can use the bot at the same time without interfering with one another.\n:white_small_square:**Custom prefixes**\nTo prevent Sokobot from conflicting with other bots, admins can choose any single-character prefix to preface Sokobot's commands.", false);
info.addField("Commands", ("``" + Bot.getPrefix(guild) + "play`` can be used to start a game if you are not currently in one.\n``" + Bot.getPrefix(guild) + "stop`` can be used to stop your active game at any time.\n``" + Bot.getPrefix(guild) + "info`` provides some useful details about the bot and rules of the game.\n``"+ Bot.getPrefix(guild) + "prefix [character]`` can be used to change the prefix the bot responds to."), false); info.addField("Commands", ("``" + Bot.getPrefix(guild) + "play`` can be used to start a game if you are not currently in one.\n``" + Bot.getPrefix(guild) + "stop`` can be used to stop your active game at any time.\n``" + Bot.getPrefix(guild) + "info`` provides some useful details about the bot and rules of the game.\n``"+ Bot.getPrefix(guild) + "prefix [character]`` can be used to change the prefix the bot responds to."), false);
info.addField("Add to your server", "https://top.gg/to-be-added", false); info.addField("Add to your server", "https://top.gg/bot/713635251703906336/", false);
info.addField("Source code", "https://github.com/PolyMarsDev/Sokobot", false); info.addField("Source code", "https://github.com/PolyMarsDev/Sokobot", false);
info.setFooter("created by PolyMars", "https://avatars0.githubusercontent.com/u/51007356?s=460&u=4eb8fd498421a2eee9781edfbadf654386cf06c7&v=4"); info.setFooter("created by PolyMars", "https://avatars0.githubusercontent.com/u/51007356?s=460&u=4eb8fd498421a2eee9781edfbadf654386cf06c7&v=4");
return info; return info;