-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenerateSampleTextCommand.cs
More file actions
36 lines (27 loc) · 1.09 KB
/
GenerateSampleTextCommand.cs
File metadata and controls
36 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#if ENABLE_COMMAND_FORGE_GENERATOR
namespace CommandForgeGenerator.Command
{
public partial class TextCommand : ICommandForgeCommand
{
public const string Type = "text";
public readonly CommandId CommandId;
public readonly string Character;
public readonly string? Body;
public readonly string? VoiceId;
public static TextCommand Create(int commandId, global::Newtonsoft.Json.Linq.JToken json)
{
var Character = (string)json["character"];
var Body = json["body"] == null ? null : (string)json["body"];
var VoiceId = json["voiceId"] == null ? null : (string)json["voiceId"];
return new TextCommand(commandId, Character, Body, VoiceId);
}
public TextCommand(int commandId, string Character, string? Body, string? VoiceId)
{
CommandId = (CommandId)commandId;
this.Character = Character;
this.Body = Body;
this.VoiceId = VoiceId;
}
}
}
#endif