This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -368,3 +368,5 @@ FodyWeavers.xsd
|
|||||||
#folders
|
#folders
|
||||||
/Plugins/
|
/Plugins/
|
||||||
/DiscordBot.rar
|
/DiscordBot.rar
|
||||||
|
/DiscordBot/Data/
|
||||||
|
/DiscordBot/Updater/
|
||||||
@@ -37,6 +37,7 @@ public class Program
|
|||||||
PreLoadComponents().Wait();
|
PreLoadComponents().Wait();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!Config.ContainsKey("ServerID") || (!Config.ContainsKey("token") || Config.GetValue<string>("token") == null || (Config.GetValue<string>("token")?.Length != 70 && Config.GetValue<string>("token")?.Length != 59)) || (!Config.ContainsKey("prefix") || Config.GetValue<string>("prefix") == null || Config.GetValue<string>("prefix")?.Length != 1) || (args.Length > 0 && args[0] == "/newconfig"))
|
if (!Config.ContainsKey("ServerID") || (!Config.ContainsKey("token") || Config.GetValue<string>("token") == null || (Config.GetValue<string>("token")?.Length != 70 && Config.GetValue<string>("token")?.Length != 59)) || (!Config.ContainsKey("prefix") || Config.GetValue<string>("prefix") == null || Config.GetValue<string>("prefix")?.Length != 1) || (args.Length > 0 && args[0] == "/newconfig"))
|
||||||
{
|
{
|
||||||
Application.Init();
|
Application.Init();
|
||||||
|
|||||||
17
PluginManager/Interfaces/AppExtension.cs
Normal file
17
PluginManager/Interfaces/AppExtension.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using PluginManager.Online.Helpers;
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace PluginManager.Interfaces
|
||||||
|
{
|
||||||
|
public interface AppExtension
|
||||||
|
{
|
||||||
|
public string Name { get; }
|
||||||
|
public VersionString Version { get; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -121,7 +121,10 @@ namespace PluginManager.Others
|
|||||||
/// <returns>A string built based on the array</returns>
|
/// <returns>A string built based on the array</returns>
|
||||||
public static string MergeStrings(this string[] s, int indexToStart)
|
public static string MergeStrings(this string[] s, int indexToStart)
|
||||||
{
|
{
|
||||||
string r = "";
|
return string.Join(' ', s, indexToStart, s.Length - 1);
|
||||||
|
|
||||||
|
/* string r = "";
|
||||||
|
|
||||||
int len = s.Length;
|
int len = s.Length;
|
||||||
if (len <= indexToStart) return "";
|
if (len <= indexToStart) return "";
|
||||||
for (int i = indexToStart; i < len - 1; ++i)
|
for (int i = indexToStart; i < len - 1; ++i)
|
||||||
@@ -132,6 +135,7 @@ namespace PluginManager.Others
|
|||||||
r += s[len - 1];
|
r += s[len - 1];
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user