Skip to content

Commit

Permalink
feat: adding calendar interface
Browse files Browse the repository at this point in the history
  • Loading branch information
yaansz committed Oct 28, 2023
1 parent caecc80 commit 752853b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/softawii/capivara/core/DroneManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.awt.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down
41 changes: 41 additions & 0 deletions src/main/java/com/softawii/capivara/listeners/CalendarGroup.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.softawii.capivara.listeners;

import com.softawii.curupira.annotations.IArgument;
import com.softawii.curupira.annotations.ICommand;
import com.softawii.curupira.annotations.IGroup;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.commands.OptionType;

@IGroup(name = "Calendar", description = "Calendar events", hidden = false)
public class CalendarGroup {

@ICommand(name = "Subscribe", description = "Subscribe to a Google Calendar", permissions = {Permission.ADMINISTRATOR})
@IArgument(name = "Calendar ID", description = "The ID of the calendar to subscribe to", required = true)
@IArgument(name = "Name", description = "The name to use for the calendar", required = true)
@IArgument(name = "Channel", description = "The channel where events will be announced", required = true, type = OptionType.CHANNEL)
@IArgument(name = "Role", description = "The role to be pinged when events begin", required = false, type = OptionType.ROLE)
public static void subscribe(SlashCommandInteractionEvent event) {
event.reply("Not implemented yet").queue();
}

@ICommand(name = "Unsubscribe", description = "Unsubscribe from a Google Calendar", permissions = {Permission.ADMINISTRATOR})
@IArgument(name = "Name", description = "The name to use for the calendar", required = true)
public static void unsubscribe(SlashCommandInteractionEvent event) {
event.reply("Not implemented yet").queue();
}

@ICommand(name = "list", description = "List all events from a Google Calendar")
@IArgument(name = "Name", description = "The name to use for the calendar", required = false)
public static void list(SlashCommandInteractionEvent event) {
event.reply("Not implemented yet").queue();
}

@ICommand(name = "Update", description = "Update configuration of a calendar", permissions = {Permission.ADMINISTRATOR})
@IArgument(name = "Name", description = "The name to use for the calendar", required = true)
@IArgument(name = "Channel", description = "The channel where events will be announced", required = true, type = OptionType.CHANNEL)
@IArgument(name = "Role", description = "The role to be pinged when events begin", required = false, type = OptionType.ROLE)
public static void update(SlashCommandInteractionEvent event) {
event.reply("Not implemented yet").queue();
}
}

0 comments on commit 752853b

Please sign in to comment.