1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-06 22:16:29 +03:00

Fix issues caused by refactor

This commit is contained in:
Octol1ttle 2022-11-12 11:02:44 +05:00
parent 3b12fb7e41
commit 7dbc4472f7
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
8 changed files with 28 additions and 108 deletions

View file

@ -11,7 +11,7 @@ public static class Boyfriend {
private static readonly DiscordSocketConfig Config = new() {
MessageCacheSize = 250,
GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.MessageContent | GatewayIntents.GuildMembers,
GatewayIntents = (GatewayIntents.AllUnprivileged | GatewayIntents.MessageContent | GatewayIntents.GuildMembers) & ~GatewayIntents.GuildInvites,
AlwaysDownloadUsers = true,
AlwaysResolveStickers = false,
AlwaysDownloadDefaultStickers = false,
@ -103,11 +103,11 @@ public static class Boyfriend {
}
public static async Task WriteGuildConfigAsync(ulong id) {
var json = JsonConvert.SerializeObject(GuildConfigDictionary[id], Formatting.Indented);
var removedRoles = JsonConvert.SerializeObject(RemovedRolesDictionary[id], Formatting.Indented);
await File.WriteAllTextAsync($"config_{id}.json", JsonConvert.SerializeObject(GuildConfigDictionary[id], Formatting.Indented));
await File.WriteAllTextAsync($"config_{id}.json", json);
await File.WriteAllTextAsync($"removedroles_{id}.json", removedRoles);
if (RemovedRolesDictionary.TryGetValue(id, out var removedRoles))
await File.WriteAllTextAsync($"removedroles_{id}.json",
JsonConvert.SerializeObject(removedRoles, Formatting.Indented));
}
public static Dictionary<string, string> GetGuildConfig(ulong id) {