This commit is contained in:
2022-10-07 13:36:15 +03:00
parent 7bc9db03f0
commit 6fc491a0d6
4 changed files with 33 additions and 9 deletions

2
.gitignore vendored
View File

@@ -368,3 +368,5 @@ FodyWeavers.xsd
#folders
/Plugins/
/DiscordBot.rar
/DiscordBot/Data/
/DiscordBot/Updater/

View File

@@ -37,6 +37,7 @@ public class Program
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"))
{
Application.Init();

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

View File

@@ -121,17 +121,21 @@ namespace PluginManager.Others
/// <returns>A string built based on the array</returns>
public static string MergeStrings(this string[] s, int indexToStart)
{
string r = "";
int len = s.Length;
if (len <= indexToStart) return "";
for (int i = indexToStart; i < len - 1; ++i)
{
r += s[i] + " ";
}
return string.Join(' ', s, indexToStart, s.Length - 1);
r += s[len - 1];
/* string r = "";
return r;
int len = s.Length;
if (len <= indexToStart) return "";
for (int i = indexToStart; i < len - 1; ++i)
{
r += s[i] + " ";
}
r += s[len - 1];
return r;
*/
}
/// <summary>