mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 09:09:00 +03:00
22 lines
No EOL
607 B
C#
22 lines
No EOL
607 B
C#
using System.Text.Json;
|
|
|
|
namespace Boyfriend;
|
|
|
|
public class GuildConfig {
|
|
public ulong Id { get; }
|
|
public string Lang { get; set; }
|
|
public string Prefix { get; set; }
|
|
public bool RemoveRolesOnMute { get; set; }
|
|
|
|
public GuildConfig(ulong id, string lang, string prefix, bool removeRolesOnMute) {
|
|
Id = id;
|
|
Lang = lang;
|
|
Prefix = prefix;
|
|
RemoveRolesOnMute = removeRolesOnMute;
|
|
}
|
|
|
|
public async void Save() {
|
|
await using var stream = File.OpenWrite("config_" + Id + ".json");
|
|
await JsonSerializer.SerializeAsync(stream, this);
|
|
}
|
|
} |