mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Add super basic group model/command
This commit is contained in:
parent
0fadc81cda
commit
253ae43c7f
15 changed files with 199 additions and 2 deletions
|
|
@ -60,5 +60,10 @@ namespace PluralKit.Core
|
|||
.Build();
|
||||
return conn.ExecuteAsync(query, pms);
|
||||
}
|
||||
|
||||
public static Task<PKGroup> CreateGroup(this IPKConnection conn, SystemId system, string name) =>
|
||||
conn.QueryFirstAsync<PKGroup>(
|
||||
"insert into groups (hid, system, name) values (find_free_group_hid(), @System, @Name) returning *",
|
||||
new {System = system, Name = name});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue