mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-06 22:16:29 +03:00
time-out failsafes and new warnings
rewrote setting values in SettingsCommand.cs fixed a bug with message edited notification on mobile fixed an exploit with WrapInline where you could escape the code block by simply using ` moved a few things in MuteCommand.cs cleaned up code updated library to 3.3.2
This commit is contained in:
parent
e41a459f6f
commit
868b6bcaa7
12 changed files with 220 additions and 345 deletions
|
@ -1,7 +1,7 @@
|
|||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Boyfriend;
|
||||
|
||||
|
@ -56,20 +56,11 @@ public static class Boyfriend {
|
|||
}
|
||||
}
|
||||
|
||||
public static void ResetGuildConfig(IGuild guild) {
|
||||
GuildConfigDictionary.Remove(guild.Id);
|
||||
|
||||
var config = new GuildConfig(guild.Id);
|
||||
config.Validate();
|
||||
|
||||
GuildConfigDictionary.Add(guild.Id, config);
|
||||
}
|
||||
|
||||
public static GuildConfig GetGuildConfig(IGuild guild) {
|
||||
Messages.Culture = new CultureInfo("ru");
|
||||
|
||||
var config = GuildConfigDictionary.ContainsKey(guild.Id) ? GuildConfigDictionary[guild.Id] :
|
||||
new GuildConfig(guild.Id);
|
||||
var config = GuildConfigDictionary.ContainsKey(guild.Id) ? GuildConfigDictionary[guild.Id]
|
||||
: new GuildConfig(guild.Id);
|
||||
config.Validate();
|
||||
|
||||
return config;
|
||||
|
@ -82,4 +73,4 @@ public static class Boyfriend {
|
|||
|
||||
throw new Exception(Messages.CouldntFindGuildByChannel);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue