Creates a new instance of the command with a given `name`.
(name: &'static str)
| 549 | |
| 550 | /// Creates a new instance of the command with a given `name`. |
| 551 | pub fn new_with_name(name: &'static str) -> Rc<Self> { |
| 552 | Rc::from(Self { |
| 553 | metadata: CallableMetadataBuilder::new(name) |
| 554 | .with_syntax(&[( |
| 555 | &[SingularArgSyntax::RequiredValue( |
| 556 | RequiredValueSyntax { |
| 557 | name: Cow::Borrowed("sample"), |
| 558 | vtype: ExprType::Text, |
| 559 | }, |
| 560 | ArgSepSyntax::End, |
| 561 | )], |
| 562 | None, |
| 563 | )]) |
| 564 | .with_category( |
| 565 | "Testing |
| 566 | This is a sample category for testing.", |
| 567 | ) |
| 568 | .with_description( |
| 569 | "This is the blurb. |
| 570 | First paragraph of the extended description. |
| 571 | Second paragraph of the extended description.", |
| 572 | ) |
| 573 | .build(), |
| 574 | }) |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | #[async_trait(?Send)] |
nothing calls this directly
no test coverage detected