Search in sources :

Example 16 with CommandInfo

use of ws.nmathe.saber.commands.CommandInfo in project Saber-Bot by notem.

the class OAuthCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - authorize access to Google Calendar";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.GOOGLE);
    String cat1 = "- Usage\n" + head + " [<token>]";
    String cont1 = "This command is used to authorizes access to the private Google Calendar calendars and events associated with a Google User account." + "\n\n" + "Authorizing access will allow me to both access (read) your private events" + " and calendars and modify those events and calendars.\n" + "This will allow you to export events created on discord to a Google Calendar.\n" + "Using the command without arguments will indicate if there is currently an authorization token linked " + "to your discord ID, as well as provides an authorization link.\n" + "Authorizing through the provided link will provide you with an authorization token." + "\n\n" + "To link that authorization token with your Discord user ID, add the authorization token as the first argument to this command.\n" + "Only one Google Account may be authorized per discord user, providing another authorization token with this command will overwrite the old token.";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head + " 4/6KcRgz5XUrkfDD8WPMQx7G6RFosmkfF4dcDooKx6t98");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 17 with CommandInfo

use of ws.nmathe.saber.commands.CommandInfo in project Saber-Bot by notem.

the class PurgeCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - removes messages created by the bot";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.USER);
    String cat1 = "- Usage\n" + head + " <channel>";
    String cont1 = "This command can be used to remove all messages sent by the bot on a particular channel " + "(with limitations).\n The messages for any active events will not be removed.\n\n" + "Messages that were sent far back in the past may not be removed, these will need to be deleted manually.\n" + "Only 100 messages will be removed per usage of this command.\n";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head);
    info.addUsageExample(head + " #alerts");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 18 with CommandInfo

use of ws.nmathe.saber.commands.CommandInfo in project Saber-Bot by notem.

the class SchedulesCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - lists all schedules";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.USER);
    String cat1 = "- Usage\n" + head + "";
    String cont1 = "This command will generate a list of all schedules active for the guild.\n" + "Each schedule is listed with a short summary.\n" + "This command is non-destructive, and can be safely used by non-administrator users.";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head);
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 19 with CommandInfo

use of ws.nmathe.saber.commands.CommandInfo in project Saber-Bot by notem.

the class SkipCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - skips to the next event occurrence";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.MISC);
    String cat1 = "- Usage\n" + head + " <id>";
    String cont1 = "This command will cause an event to cancel the current iteration of an event, " + "and reschedule the event for the next time the event is set to repeat.\n" + "If an event is not configured to repeat, the event will be removed." + "\n\n" + "It is not possible to undo an event skip, so use with caution.\n" + "If you decide you didn't want to skip an event's occurrence after-the-fact, " + "you will need to recreate the event!";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head + " 10agj2");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 20 with CommandInfo

use of ws.nmathe.saber.commands.CommandInfo in project Saber-Bot by notem.

the class SyncCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - sync a schedule to a google calendar";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.GOOGLE);
    String cat1 = "- Usage\n" + head + " <channel> [import|export] [<calendar address>]";
    String cont1 = "The sync command will replace all events in the specified channel" + "with events imported from a public google calendar.\n" + "The command imports the next 7 days of events into the channel;" + " the channel will then automatically re-sync once every day." + "\n\n" + "If ``<calendar address>`` is not included, " + "the address saved in the schedule's settings will be used." + "\n\n" + "For more information concerning Google Calendar setup, reference the " + "online docs at https://nmathe.ws/bots/saber";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head + " #new_schedule g.rit.edu_g4elai703tm3p4iimp10g8heig@group.calendar.google.com");
    info.addUsageExample(head + " #calendar import g.rit.edu_g4elai703tm3p4iimp10g8heig@group.calendar.google.com");
    info.addUsageExample(head + " #calendar export 0a0jbiclczoiaai@group.calendar.google.com");
    info.addUsageExample(head + " #new_schedule");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Aggregations

CommandInfo (ws.nmathe.saber.commands.CommandInfo)20 Command (ws.nmathe.saber.commands.Command)1