Skip to content

Conversation

amaid
Copy link
Collaborator

@amaid amaid commented Sep 3, 2025

Implements discord compatible commands inspired from CommandLine for the following entities:

  1. User
  2. Project
  3. Publisher
  4. Repositories

The commands include mainly Get/List/Create operation for the entities above

@Arlodotexe Arlodotexe linked an issue Sep 20, 2025 that may be closed by this pull request
{
public interface INomadRepoService
{
public Task<(RepositoryContainer, WacsdkCommandConfig, WacsdkNomadSettings)> GetNomadRepoAsync(string repoId, string knownId, CancellationToken token);
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to remove WacsdkCommandConfig from this interface. It's a high-level object that encodes runtime options, not specific to any one repo or operator.

Copy link
Member

Choose a reason for hiding this comment

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

We also don't need the knownId to get the repo itself. Known IDs are used within a repo to locate registered data, it's not used to get the repo itself.

// Cancellation
var cancellationTokenSource = new CancellationTokenSource();
var cancellationToken = cancellationTokenSource.Token;
Console.CancelKeyPress += (sender, eventArgs) =>
Copy link
Member

Choose a reason for hiding this comment

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

This code is already present above.


public class WacsdkCommandConfig
{
public CancellationToken CancellationToken { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

We should remove this-- cancellation was passed through here for cancelling via Console.CancelKeyPress

{
public class UserCommandGroup(INomadRepoService nomadRepoService, IInteractionContext interactionContext, IFeedbackService feedbackService, IDiscordRestInteractionAPI interactionAPI, IDiscordRestChannelAPI channelApi, IDiscordRestGuildAPI guildApi, ICommandContext context) : Remora.Commands.Groups.CommandGroup
{
[Command("createUser")]
Copy link
Member

Choose a reason for hiding this comment

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

Command groups should follow this structure, as shown to the end user:

waccli <entityType> <memberName> <operation> <params/values>

This should be on all three root entity types, not just this User file.

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.

CLI to Slash Commands Integration
3 participants