Search in sources :

Example 1 with CommandInfo

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

the class GuildCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - adjust guild-wide settings";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.CORE);
    String cat1 = "- Usage\n" + head + " <option> <new config>";
    String cont1 = "The guild command may be used to modify guild-wide settings such as your guild's command prefix and control channel.\n" + "Issuing the guild command without arguments will output the current settings for your discord server.\n\n" + "Options for <option> are: ``restrict``, ``unrestrict``, ``prefix``, and ``control``.";
    info.addUsageCategory(cat1, cont1);
    String cat2 = "+ (Un)Restricted Commands";
    String cont2 = "Commands may be configured as either 'restricted' or 'unrestricted' using the ``restrict`` and ``unrestrict`` command options.\n\n" + "A restricted command can only be used in the designated control channel.\n" + "Unrestricted commands may be used in any channel the bot is allowed to view, and by anyone who can post in those channels.";
    info.addUsageCategory(cat2, cont2);
    info.addUsageExample(head + " control #bot_management");
    info.addUsageExample(head + " unrestrict info");
    info.addUsageExample(head + " restrict create");
    info.addUsageExample(head + " prefix $");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 2 with CommandInfo

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

the class EditCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - modify an event";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.CORE);
    String cat1 = "- Usage\n" + head + " <ID> [<option> <arg(s)>]";
    String cont1 = "The edit command will allow you to change an event's settings." + "\n\n" + "``<option>`` is to contain which attribute of the event you wish to edit. ``<arg>`` should be the" + " new configuration." + "\n\n```diff\n+ Options ```\n" + "List of ``<option>``s: ``start``, ``end``, ``title``, ``comment``, ``date``, " + "``start-date``, ``end-date``, ``repeat``, ``interval``, ``url``, ``quiet-start``, ``quiet-end``, ``quiet-remind``, ``expire``, ``deadline``, ``count``," + " and ``limit``.\n\n" + "Most of the options listed above accept the same arguments as the ``create`` command.\n" + "Reference the ``help`` information for the ``create`` command for more information.\n" + "Similar to the ``create`` command, any number of [<option> <arg(s)>] pairs can be appended to the command." + "\n\n" + "The comment option requires one additional argument immediately after the 'comment' argument.\n" + "This argument identifies what comment operation to do. The operations are ``add``, ``remove``, and ``swap``." + "\nSee the examples for their usage.";
    info.addUsageCategory(cat1, cont1);
    String cat2 = "+ Announcement Silencing";
    String cont2 = "Announcements for individual events can be toggled on-off using any of these three options: " + "``quiet-start``, ``quiet-end``, ``quiet-remind``\n" + "No additional arguments need to be provided when using one of the ``quiet-`` options.";
    info.addUsageCategory(cat2, cont2);
    String cat3 = "+ RSVP Limits";
    String cont3 = "If the schedule that the event is placed on is rsvp enabled (which may be turned on using the ``config`` command)" + " a limit to the number of users who may rsvp as a particular group can be set using the ``limit`` option.\n" + "The ``limit`` option requires two additional arguments: the first of which should be the name of the rsvp group to " + "limit and the second argument should the be number of max individuals allowed to rsvp for that group.\n" + "Use \"off\" as the argument to remove a previously set limit.";
    info.addUsageCategory(cat3, cont3);
    String cat4 = "+ Image and Thumbnail";
    String cont4 = "The thumbnail and image of the event's discord embed can be set through the 'thumbnail' and 'image' options.\n" + "Provide a full url direct link to the image as the argument.\n" + "The thumbnail of the event should appear as a small image to the right of the event's description.\n" + "The image of the event should appear as a full-size image below the main content.";
    info.addUsageCategory(cat4, cont4);
    info.addUsageExample(head + " 9aA4/K comment add \"Attendance is mandatory\"");
    info.addUsageExample(head + " 9aA4/K comment remove 3");
    info.addUsageExample(head + " 9aA4/K comment swap 1 2");
    info.addUsageExample(head + " AJ@29l start 21:15");
    info.addUsageExample(head + " AJ@29l end 2:15pm");
    info.addUsageExample(head + " AJ@29l start-date 10/9");
    info.addUsageExample(head + " AJ@29l repeat \"Sun, Tue, Fri\"");
    info.addUsageExample(head + " AJ@29l quiet-start");
    info.addUsageExample(head + " AJ@29l expire 2019/1/1");
    info.addUsageExample(head + " AJ@29l limit Yes 15");
    info.addUsageExample(head + " J09DlA announcement add #general start-1h \"Get ready! **%t** begins in one hour!\"");
    info.addUsageExample(head + "J09DlA announcement remove 1");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 3 with CommandInfo

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

the class EventsCommand method info.

@Override
public CommandInfo info(String prefix) {
    String head = prefix + this.name();
    String usage = "``" + head + "`` - lists all events for the guild";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.USER);
    String cat1 = "- Usage\n" + head + "";
    String cont1 = "This command will generate a list of all upcoming events for the guild.\n" + "Each event is listed with a short summary detailing the event's title, ID, and start-time.\n" + "The output can be filtered by channel by appending desired schedules to the command.\n" + "This command is non-destructive, and can be safely used by non-administrator users.";
    info.addUsageCategory(cat1, cont1);
    info.addUsageExample(head);
    info.addUsageExample(head + " #schedule");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 4 with CommandInfo

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

the class ConfigCommand method info.

@Override
public CommandInfo info(String prefix) {
    String cmd = prefix + this.name();
    String usage = "``" + cmd + "`` - configure a schedule's settings";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.CORE);
    String cat1 = "- Usage\n" + cmd + " <channel> [<option> <new config>]";
    String cont1 = "The config command can be used to both view and " + "change schedule settings. To view a schedule's current settings, supply only the ``<channel>`` argument.\n" + "The full list of setting options can be found when using the command with no <option> or <new config> parameters." + "\n\n" + "To modify any settings, use the term inside the brackets as the parameter of <option> and supply the " + "new setting configuration as the final <new config> parameter.\n" + "To turn off calendar sync or event reminders, pass **off** as a command parameter when setting the config ``sync`` and ``remind`` options.";
    info.addUsageCategory(cat1, cont1);
    String cat2 = "+ Event Reminders";
    String cont2 = "Events can be configured to send reminder announcements at configured thresholds before an event begins.\n" + "To configure the times at which events on the schedule should send reminders, use the 'remind' with an " + "argument containing the relative times to remind delimited by spaces (see examples).\n" + "Reminder messages are defined by a configured format, see below.";
    info.addUsageCategory(cat2, cont2);
    String cat3 = "+ Custom announcements and reminders";
    String cont3 = "When an event begins or ends an announcement message is sent to the configured channel.\n" + "The message that is sent is determined from the message format the schedule is configured to use." + "\n\n" + "When creating a custom announcement message format parameters of the event can be inserted into " + "the message using 'tokens' which start with the % character.\n" + "Checkout the online docs for more detailed information." + "\n\n" + "If you wish to create a multi-line message like the default message format, new lines can be entered using" + " SHIFT+Enter.\n" + "However, be sure to encapsulate the entire string (new lines included) in quotations." + "\n\n" + "To reset a custom message or channel to the default pass **reset** as the command parameter.";
    info.addUsageCategory(cat3, cont3);
    String cat4 = "+ Event RSVP";
    String cont4 = "Schedules can be configured to allow users to RSVP to events on the schedule.\n" + "To enable RSVP for the schedule, use the ``rsvp`` option and provide the argument **on** (see Examples for details)" + "\n\n" + "Custom rsvp options can be configured by using ``rsvp add`` and ``rsvp remove``.\n" + "When adding a new rsvp group two arguments are necessary: the first argument denotes the name for the rsvp group," + "the second argument is the emoticon to use as the message reaction button.\n" + "When removing an rsvp group, simply provide the group name as an argument.\n" + "Custom discord emoticons are allowed." + "\n\n" + "\nIf you would like to allow users to RSVP for multiple categories, turn exclusivity off by using the ``exclude`` option." + "\nWhen ``logging`` is configured with a channel, all rsvp join/leave actions will get logged to the channel" + "\nThe ``confirm`` rsvp setting may be enabled to have the bot direct message users upon joining/leaving an rsvp group." + "\nThe emoji used to clear a user from all rsvp groups can be set using the ``clear`` option." + "When ``clear`` is configured with a discord reaction, the emoji will get added to events and when clicked will remove the user from the rsvp categories on the event.";
    info.addUsageCategory(cat4, cont4);
    info.addUsageExample(cmd + " #guild_events");
    info.addUsageExample(cmd + " #guild_events msg \"@here The event %t %a. %f\"");
    info.addUsageExample(cmd + " #guild_events remind \"10, 20, 30 min\"");
    info.addUsageExample(cmd + " #guild_events remind remove \"20 min\"");
    info.addUsageExample(cmd + " #guild_events end-remind \"10 min\"");
    info.addUsageExample(cmd + " #events_channel chan \"general\"");
    info.addUsageExample(cmd + " #events_channel remind-msg \"reset\"");
    info.addUsageExample(cmd + " #schedule rsvp on");
    info.addUsageExample(cmd + " #schedule rsvp add DPS :crossed_swords:");
    info.addUsageExample(cmd + " #schedule rsvp remove Undecided");
    info.addUsageExample(cmd + " #schedule clear :potato:");
    info.addUsageExample(cmd + " #schedule exclusivity off");
    return info;
}
Also used : CommandInfo(ws.nmathe.saber.commands.CommandInfo)

Example 5 with CommandInfo

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

the class CreateCommand method info.

@Override
public CommandInfo info(String prefix) {
    String cmd = prefix + this.name();
    String usage = "``" + cmd + "`` - add an event to a schedule";
    CommandInfo info = new CommandInfo(usage, CommandInfo.CommandType.CORE);
    String cat1 = "- Usage\n" + cmd + " <channel> <title> <start> [<end> <extra>]";
    String cont1 = "The create command will add a new entry to a schedule.\n" + "Entries MUST be initialized with a title, and a start time." + "\n\n" + "The end time (<end>) may be omitted. Start and end times should be of form h:mm with " + "optional am/pm appended on the end.\n" + "Optionally, events can be configured with comments, repeat settings, and a start/end dates.";
    info.addUsageCategory(cat1, cont1);
    String cat2 = "+ Repeat on weekdays or interval";
    String cont2 = "Repeat settings can be configured by adding ``repeat <daily|\"Su,Mo,Tu,We,Th,Fr,Sa\">`` to ``<extra>``" + " to cause the event to repeat on the given days.\n Default behavior is no repeat.\n An event can instead " + "be configured to repeat on a daily interval by adding ``interval <number>`` to ``<extra>``";
    info.addUsageCategory(cat2, cont2);
    String cat3 = "+ Start and end date";
    String cont3 = "Adding ``date <yyyy/MM/dd>`` to ``<extra>`` will set the event's start and end date.\n For more granular " + "control you can instead use ``start-date <yyyy/MM/dd>`` and ``end-date <yyyy/MM/dd>`` in place of ``date``." + "\n\n" + "The date must be formatted like year/month/day, however year and month can be omitted " + "('month/day' and 'day' are valid).\nThe omitted values will be inherited from the current date." + "\n\n" + "Dates which are in a non-number format (such as '10 May') are not acceptable.\n" + "Default behavior is to use the next day as the event's date." + "\n\nAs a shortcut, appending ``today`` to the command will act like the ``date M/d`` option where " + "the date is set to the current day.";
    info.addUsageCategory(cat3, cont3);
    String cat4 = "+ Event description";
    String cont4 = "Comments may be added by adding ``\"YOUR COMMENT\"`` at the end of ``<extra>``.\n" + "Up to 10 of comments may be added in ``<extra>``.\n" + "If your title, comment, or channel includes any space characters, the phrase must be enclosed in " + "quotations (see examples).";
    info.addUsageCategory(cat4, cont4);
    String cat5 = "+ Event expiration";
    String cont5 = "In some instances of a repeating event, it may be desirable to set a date for when that event will stop recurring.\n" + "This can be accomplished using the ``expire`` argument.\n" + "Add ``expire <yyyy/MM/dd>`` to a create command to create an event with an expiration date (see examples).";
    info.addUsageCategory(cat5, cont5);
    info.addUsageExample(cmd + " #event_schedule \"Party in the Guild Hall\" 19:00 2:00");
    info.addUsageExample(cmd + " #guild_reminders \"Sign up for Raids\" 4:00pm interval 2");
    info.addUsageExample(cmd + " #raid_schedule \"Weekly Raid Event\" 7:00pm 12:00pm repeat \"Fri, Sun\" \"Healers and " + "tanks always in demand.\" \"PM our raid captain with your role and level if attending.\"");
    info.addUsageExample(cmd + " #competition \"Capture the Flag\" 10:00am start-date 10/20 end-date 10/23");
    info.addUsageExample(cmd + " #shows \"Pokemon\" 5:29pm 6:00pm date 3/30 repeat \"Sat\" expire 5/30");
    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