Cleaned up the Console bot. Added PluginNotFoundException
This commit is contained in:
12
DiscordBotCore/Others/Exceptions/PluginNotFoundException.cs
Normal file
12
DiscordBotCore/Others/Exceptions/PluginNotFoundException.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace DiscordBotCore.Others.Exceptions
|
||||
{
|
||||
internal class PluginNotFoundException : Exception
|
||||
{
|
||||
public PluginNotFoundException(string pluginName) : base($"Plugin {pluginName} was not found") { }
|
||||
|
||||
public PluginNotFoundException(string pluginName, string url, string branch) :
|
||||
base ($"Plugin {pluginName} was not found on {url} (branch: {branch}") { }
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public static class Functions
|
||||
/// The location for the Resources folder
|
||||
/// String: ./Data/Resources/
|
||||
/// </summary>
|
||||
public static readonly string dataFolder = @"./Data/Resources/";
|
||||
public static string dataFolder => Application.CurrentApplication.DataFolder;
|
||||
|
||||
public static Color RandomColor
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace DiscordBotCore.Others;
|
||||
public class SettingsDictionary<TKey, TValue>
|
||||
{
|
||||
private string _File { get; }
|
||||
private IDictionary<TKey, TValue> _Dictionary;
|
||||
protected IDictionary<TKey, TValue> _Dictionary;
|
||||
|
||||
public SettingsDictionary(string file)
|
||||
{
|
||||
@@ -84,4 +84,6 @@ public class SettingsDictionary<TKey, TValue>
|
||||
}
|
||||
set => _Dictionary[key] = value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user