Added command for privacy policy
This commit is contained in:
parent
6f35dd71a2
commit
cf1a715ddf
@ -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));
|
||||||
|
}
|
||||||
|
}
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user