mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-12-22 23:42:50 +01:00
17 lines
450 B
C#
17 lines
450 B
C#
namespace DHT.Server.Database {
|
|
public static class DatabaseExtensions {
|
|
public static void AddFrom(this IDatabaseFile target, IDatabaseFile source) {
|
|
foreach (var server in source.GetAllServers()) {
|
|
target.AddServer(server);
|
|
}
|
|
|
|
foreach (var channel in source.GetAllChannels()) {
|
|
target.AddChannel(channel);
|
|
}
|
|
|
|
target.AddUsers(source.GetAllUsers().ToArray());
|
|
target.AddMessages(source.GetMessages().ToArray());
|
|
}
|
|
}
|
|
}
|