This repository has been archived on 2025-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Octobot/Boyfriend/GuildConfig.cs
2021-12-15 11:19:14 +05:00

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);
}
}