Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize commands (user facing + directory structure) #29

Merged
merged 51 commits into from
Feb 2, 2022

Conversation

rsek
Copy link
Contributor

@rsek rsek commented Jan 23, 2022

aside from renames, includes some additional description. /progress and /clock are now collapsed into single commands, but i've also retained the command group versions in separate files; once discord has a more sensible display for subcommand groups, i may bring them back in that format (mainly so i can better annotate the nuances of the individual progress/clock types)

also resolves #37

user command organization:
Screen Shot 2022-01-22 at 7 16 55 PM
Screen Shot 2022-01-22 at 7 17 06 PM

directory structure:
Screen Shot 2022-01-22 at 7 22 46 PM

@rsek
Copy link
Contributor Author

rsek commented Jan 24, 2022

rebased with #27

@@ -3,9 +3,9 @@

namespace TheOracle2.Commands;

public class RightClickCommands : InteractionModuleBase<SocketInteractionContext>
public class RecreateMessageCommand : InteractionModuleBase<SocketInteractionContext>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more descriptive name, since it's a module of one command atm; add'l MessageCommands can live as their own modules in the MessageCommands directory

@@ -11,7 +11,7 @@ public CampaignClock(ClockSize segments, int filledSegments, string title, strin
}

public override string EmbedCategory => "Campaign Clock";
public override string LogMessage => "The event is triggered or the project is complete. Envision the outcome and the impact on your setting.";
public override string ClockFillMessage => "The event is triggered or the project is complete. Envision the outcome and the impact on your setting.";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some widgets can produce more than one kind of alert output (scene challenges for instance, which are both a clock and a progress track), so a single LogMessage won't work for them

return new ComponentBuilder().WithSelectMenu(menu);
return new ComponentBuilder()
.WithSelectMenu(menu)
// .WithButton(ILogWidget.ToggleAlertButton(AlertOnIncrement))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds like we're going a different direction with log output, but if it's NBD i'd prefer to leave this here commented out for now.

@@ -1,28 +0,0 @@
using Discord.Interactions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality moved to RollCommandGroup.cs

@@ -1,139 +0,0 @@
using Discord.Interactions;
Copy link
Contributor Author

@rsek rsek Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality moved to PlayerCharacterCommandGroup & EditPcComponents

@@ -1,24 +0,0 @@
using Discord.Interactions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality moved to RollCommandGroup

@@ -1,20 +0,0 @@
using Discord.Interactions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merged with GenericComponents

public async Task AskTheOracle(
[Summary(description: "The odds of receiving a 'yes'.")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one's a legit bugfix 🤦 currently they're inverted from where they ought to be

@@ -17,7 +17,7 @@ public AssetCommand(EFContext dbContext, Random random)
public EFContext DbContext { get; }
public Random Random { get; }

[SlashCommand("asset", "Generates an asset")]
[SlashCommand("asset", "Display an interactive asset card (p. 50).")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"generate" could imply generating custom content

@@ -0,0 +1,100 @@
using Discord.Interactions;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a "collapsed" version of the previous clock command group. i've retained the command group version in case we want to switch back later, once discord handled subcommand displays more gracefully.

@@ -0,0 +1,85 @@
using Discord.Interactions;
Copy link
Contributor Author

@rsek rsek Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the /player-character group is intended for "meta" operations: creating, deleting, setting attribute values (rather than incrementing/decrementing), etc. since typically they're used relatively infrequently (once a session at most), it's not a big deal if they're 'gated' behind a lengthy (but descriptive) command group name.

@@ -0,0 +1,116 @@
using Discord.Interactions;
Copy link
Contributor Author

@rsek rsek Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this being a single command has the same rationale as /clock, above

name change rationale: progress-track is a little more descriptive (and cleaves close to the book/asset text - iirc 'track' alone doesn't show up too often). it also means that someone who starts typing /progress (which i suspect is the first thing many people will try when seeking progress track related commands) will see this command.

@@ -7,9 +7,10 @@

namespace TheOracle2;

public class PlayerRollCommand : InteractionModuleBase
[Group("roll", "Make an action roll (p. 28) or progress roll (p. 39). For oracle tables, use '/oracle'")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i figure /roll is what people will try first for action/progress rolls, and this means people only have to remember one command to execute the most common game functions.

i think a command group is the best solution here. for one, /roll is very brief. for another, as top-level commands they'd have to be named /roll-action and /roll-progress to function that way, which doesn't actually save many (if any) keystrokes

@rsek
Copy link
Contributor Author

rsek commented Jan 27, 2022

resolves #37

@XenotropicDev XenotropicDev merged commit e8850cc into XenotropicDev:main Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Ask the Oracle odds are inverted
2 participants