You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

VoiceShortcut.cs 779 B

123456789101112131415161718192021222324252627
  1. using System.Diagnostics;
  2. using Model = Discord.API.Rpc.VoiceShortcut;
  3. namespace Discord.Rpc
  4. {
  5. [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
  6. public struct VoiceShortcut
  7. {
  8. public VoiceShortcutType Type { get; }
  9. public int Code { get; }
  10. public string Name { get; }
  11. internal VoiceShortcut(VoiceShortcutType type, int code, string name)
  12. {
  13. Type = type;
  14. Code = code;
  15. Name = name;
  16. }
  17. internal static VoiceShortcut Create(Model model)
  18. {
  19. return new VoiceShortcut(model.Type.Value, model.Code.Value, model.Name.Value);
  20. }
  21. public override string ToString() => $"{Name}";
  22. private string DebuggerDisplay => $"{Name} ({Code}, {Type})";
  23. }
  24. }