Skip to content

Add auto text elements #2

@quinchs

Description

@quinchs

Summary

Having to write <text>...</text> may get tedious, and it would be nice to allow scalar values inside certain components to be interpreted as text nodes.

Sample

<container>
    This is some text!
</container>
new global::Discord.ContainerBuilder()
{
    Components = 
    [
        new global::Discord.TextDisplayBuilder(
            content: "This is some text!"
        )
    ]
}

Implementation of this should be rather trivial and can be done in the component graph layer, a mechanism for enabling/disabling auto-text nodes based on the parent node should be rather explicit.

This feature should also be gated by a compiler/analyzer option

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions