Added command for privacy policy

This commit is contained in:
Aleksei 2020-07-23 16:42:46 -04:00
parent 6f35dd71a2
commit cf1a715ddf
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,36 @@
package dev.salmonllama.fsbot.commands.general;
import dev.salmonllama.fsbot.guthix.Command;
import dev.salmonllama.fsbot.guthix.CommandContext;
import dev.salmonllama.fsbot.guthix.CommandPermission;
import dev.salmonllama.fsbot.guthix.PermissionType;
import org.javacord.api.entity.message.embed.EmbedBuilder;
import java.util.Collection;
import java.util.Collections;
public class PrivacyCommand extends Command {
@Override public String name() { return "Privacy"; }
@Override public String description() { return "Directs users to the bot's privacy policy"; }
@Override public String usage() { return "privacy"; }
@Override public String category() { return "General"; }
@Override public CommandPermission permission() { return new CommandPermission(PermissionType.NONE); }
@Override public Collection<String> aliases() { return Collections.singletonList("privacy"); }
@Override
public void onCommand(CommandContext ctx) {
String privacyUrl = "https://github.com/Salmonllama/Fashionscape-Bot/blob/database-rewrite/privacy.md"; // TODO: Change this to master
EmbedBuilder response = new EmbedBuilder()
.setTitle("Click Here to open")
.setUrl(privacyUrl);
EmbedBuilder response2 = new EmbedBuilder()
.setTitle("Link")
.setDescription(privacyUrl)
.setAuthor(ctx.getApi().getYourself());
ctx.reply(response).thenAcceptAsync(msg -> ctx.reply(response2));
}
}

View File

@ -63,6 +63,7 @@ public class Guthix implements MessageCreateListener {
addCommand(new OutfitCommand()); addCommand(new OutfitCommand());
addCommand(new HelpCommand(this)); addCommand(new HelpCommand(this));
addCommand(new StatsCommand()); addCommand(new StatsCommand());
addCommand(new PrivacyCommand());
} }
public void addCommand(Command cmd) { public void addCommand(Command cmd) {