mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 01:00:12 +00:00
feat: implement system name etc. commands
This commit is contained in:
parent
87f6fe9d75
commit
ac52b5c257
10 changed files with 155 additions and 103 deletions
|
|
@ -111,8 +111,7 @@ public class Parameters
|
|||
// todo: i think this should return null for everything...?
|
||||
if (param == null) return default;
|
||||
return extract_func(param)
|
||||
// this should never really happen (hopefully!), but in case the parameter names dont match up (typos...) between rust <-> c#...
|
||||
// (it would be very cool to have this statically checked somehow..?)
|
||||
// this should never happen unless codegen somehow uses a wrong name
|
||||
?? throw new PKError($"Flag {flag_name.AsCode()} was not found or did not have a value defined for command {Callback().AsCode()} -- this is a bug!!");
|
||||
}
|
||||
|
||||
|
|
@ -122,8 +121,7 @@ public class Parameters
|
|||
// todo: i think this should return null for everything...?
|
||||
if (param == null) return default;
|
||||
return extract_func(param)
|
||||
// this should never really happen (hopefully!), but in case the parameter names dont match up (typos...) between rust <-> c#...
|
||||
// (it would be very cool to have this statically checked somehow..?)
|
||||
// this should never happen unless codegen somehow uses a wrong name
|
||||
?? throw new PKError($"Parameter {param_name.AsCode()} was not found for command {Callback().AsCode()} -- this is a bug!!");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue