use of gg.projecteden.discord.appcommands.annotations.RequiredRole in project Nexus by ProjectEdenGG.
the class DiscordAppCommand method forcelink.
@Verify
@RequiredRole("Staff")
@Command("Force link a Minecraft and Discord account")
void forcelink(@Desc("Minecraft account") DiscordUser player, @Desc("Discord account") Member discordUser) {
player.setUserId(discordUser.getId());
new DiscordUserService().save(player);
Discord.addRole(discordUser.getId(), DiscordId.Role.VERIFIED);
Discord.staffLog("**%s** Discord account force linked to **%s** by %s via Discord".formatted(player.getNickname(), player.getNameAndDiscrim(), user().getNickname()));
}
use of gg.projecteden.discord.appcommands.annotations.RequiredRole in project Nexus by ProjectEdenGG.
the class DiscordAppCommand method lockdown.
@RequiredRole("Staff")
@Command("Toggle lockdown")
void lockdown(@Desc("Lockdown state") @Optional Boolean state) {
SettingService settingService = new SettingService();
Setting setting = settingService.get("discord", "lockdown");
setting.setBoolean(state == null ? !setting.getBoolean() : state);
settingService.save(setting);
reply("Discord lockdown " + (setting.getBoolean() ? "enabled by " + nickname() + ", new members will be automatically kicked" : "disabled by " + nickname()));
}
Aggregations