summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:33:41 +0200
committeruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:33:41 +0200
commitaf74efccf8d21e6151022b71f3cacd3fa83024ee (patch)
tree20f383065d5cadea36e8d11d4bb3b35eca99f691
parente6181c24124d97f2fbc932b8a68311e625463156 (diff)
Seperate the Core from dsa gamelogic
-rw-r--r--.eslintrc13
-rw-r--r--.firebaserc5
-rw-r--r--DSACore/Controllers/CommandsController.cs (renamed from dsa/DSACore/Controllers/CommandsController.cs)0
-rw-r--r--DSACore/Controllers/LobbyController.cs (renamed from dsa/DSACore/Controllers/LobbyController.cs)0
-rw-r--r--DSACore/Controllers/TokensController.cs (renamed from dsa/DSACore/Controllers/TokensController.cs)0
-rw-r--r--DSACore/Controllers/ValuesController.cs (renamed from dsa/DSACore/Controllers/ValuesController.cs)0
-rw-r--r--DSACore/DSACore.csproj (renamed from dsa/DSACore/DSACore.csproj)4
-rw-r--r--DSACore/Hubs/Login.cs (renamed from dsa/DSACore/Hubs/Login.cs)0
-rw-r--r--DSACore/Models/Network/Group.cs (renamed from dsa/DSACore/Models/Network/Group.cs)0
-rw-r--r--DSACore/Models/Network/Token.cs (renamed from dsa/DSACore/Models/Network/Token.cs)0
-rw-r--r--DSACore/Models/Network/User.cs (renamed from dsa/DSACore/Models/Network/User.cs)0
-rw-r--r--DSACore/Program.cs (renamed from dsa/DSACore/Program.cs)0
-rw-r--r--DSACore/Properties/DSALib-Auxiliary-CommandInfo.json (renamed from dsa/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json)0
-rw-r--r--DSACore/Properties/DSALib-DSA_Game-Characters-Character.json (renamed from dsa/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json)0
-rw-r--r--DSACore/Properties/PublishProfiles/FolderProfile.pubxml (renamed from dsa/DSACore/Properties/PublishProfiles/FolderProfile.pubxml)0
-rw-r--r--DSACore/Properties/PublishProfiles/FolderProfile1.pubxml (renamed from dsa/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml)0
-rw-r--r--DSACore/Properties/launchSettings.json (renamed from dsa/DSACore/Properties/launchSettings.json)0
-rw-r--r--DSACore/Startup.cs (renamed from dsa/DSACore/Startup.cs)0
-rw-r--r--DSACore/appsettings.Development.json (renamed from dsa/DSACore/appsettings.Development.json)0
-rw-r--r--DSACore/appsettings.json (renamed from dsa/DSACore/appsettings.json)0
-rw-r--r--DiscordBot/Auxiliary/CommandExtension.cs98
-rw-r--r--DiscordBot/Auxiliary/Dice.cs31
-rw-r--r--DiscordBot/Auxiliary/Permissions.cs32
-rw-r--r--DiscordBot/Auxiliary/RandomMisc.cs36
-rw-r--r--DiscordBot/Auxiliary/SpellCorrect.cs105
-rw-r--r--DiscordBot/CommandHandler.cs112
-rw-r--r--DiscordBot/Commands/CommandHelper.cs119
-rw-r--r--DiscordBot/Commands/FileHandler.cs24
-rw-r--r--DiscordBot/Commands/MiscCommands.cs190
-rw-r--r--DiscordBot/DiscordBot.csproj12
-rw-r--r--DiscordBot/Program.cs58
-rw-r--r--DiscordBot/Rework/Permissions.cs38
-rw-r--r--database.rules.json7
-rw-r--r--dsa/DSACore/PropertiesDSALib-Auxiliary-CommandInfo.json101
-rw-r--r--dsa/DSACore/PropertiesDSALib-DSA_Game-Characters-Character.json290
-rw-r--r--dsa/DSACore/PropertiesNewtonsoft-Json-Linq-JProperty.json30
-rw-r--r--dsa/DSACore/Token1
-rw-r--r--dsa/DiscoBot.sln43
-rw-r--r--firebase.json20
-rw-r--r--firestore.indexes.json3
-rw-r--r--firestore.rules7
-rw-r--r--storage.rules7
42 files changed, 45 insertions, 1341 deletions
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index bdf49cf..0000000
--- a/.eslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "parser": "babel-eslint",
- "extends": "google",
- "parserOptions": {
- "ecmaVersion": 2017,
- "sourceType": "module"
- },
- "rules": {
- "no-unused-vars": "off",
- "no-extend-native": "off",
- "arrow-parens": "off"
- }
-}
diff --git a/.firebaserc b/.firebaserc
deleted file mode 100644
index 13ab980..0000000
--- a/.firebaserc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "projects": {
- "default": "heldenonline-4d828"
- }
-}
diff --git a/dsa/DSACore/Controllers/CommandsController.cs b/DSACore/Controllers/CommandsController.cs
index b6e0be2..b6e0be2 100644
--- a/dsa/DSACore/Controllers/CommandsController.cs
+++ b/DSACore/Controllers/CommandsController.cs
diff --git a/dsa/DSACore/Controllers/LobbyController.cs b/DSACore/Controllers/LobbyController.cs
index 7890b4f..7890b4f 100644
--- a/dsa/DSACore/Controllers/LobbyController.cs
+++ b/DSACore/Controllers/LobbyController.cs
diff --git a/dsa/DSACore/Controllers/TokensController.cs b/DSACore/Controllers/TokensController.cs
index a85cabe..a85cabe 100644
--- a/dsa/DSACore/Controllers/TokensController.cs
+++ b/DSACore/Controllers/TokensController.cs
diff --git a/dsa/DSACore/Controllers/ValuesController.cs b/DSACore/Controllers/ValuesController.cs
index eb08898..eb08898 100644
--- a/dsa/DSACore/Controllers/ValuesController.cs
+++ b/DSACore/Controllers/ValuesController.cs
diff --git a/dsa/DSACore/DSACore.csproj b/DSACore/DSACore.csproj
index f7def31..b350c64 100644
--- a/dsa/DSACore/DSACore.csproj
+++ b/DSACore/DSACore.csproj
@@ -17,8 +17,8 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\DSALib\DSALib.csproj" />
- <ProjectReference Include="..\FireBase\FireBase.csproj" />
+ <ProjectReference Include="..\dsa\DSALib\DSALib.csproj" />
+ <ProjectReference Include="..\dsa\FireBase\FireBase.csproj" />
</ItemGroup>
<ItemGroup>
diff --git a/dsa/DSACore/Hubs/Login.cs b/DSACore/Hubs/Login.cs
index f08c24a..f08c24a 100644
--- a/dsa/DSACore/Hubs/Login.cs
+++ b/DSACore/Hubs/Login.cs
diff --git a/dsa/DSACore/Models/Network/Group.cs b/DSACore/Models/Network/Group.cs
index efe12ee..efe12ee 100644
--- a/dsa/DSACore/Models/Network/Group.cs
+++ b/DSACore/Models/Network/Group.cs
diff --git a/dsa/DSACore/Models/Network/Token.cs b/DSACore/Models/Network/Token.cs
index 451cafc..451cafc 100644
--- a/dsa/DSACore/Models/Network/Token.cs
+++ b/DSACore/Models/Network/Token.cs
diff --git a/dsa/DSACore/Models/Network/User.cs b/DSACore/Models/Network/User.cs
index 8b8008c..8b8008c 100644
--- a/dsa/DSACore/Models/Network/User.cs
+++ b/DSACore/Models/Network/User.cs
diff --git a/dsa/DSACore/Program.cs b/DSACore/Program.cs
index 8af0a74..8af0a74 100644
--- a/dsa/DSACore/Program.cs
+++ b/DSACore/Program.cs
diff --git a/dsa/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json b/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json
index b9941f2..b9941f2 100644
--- a/dsa/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json
+++ b/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json
diff --git a/dsa/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json b/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json
index fd387f5..fd387f5 100644
--- a/dsa/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json
+++ b/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json
diff --git a/dsa/DSACore/Properties/PublishProfiles/FolderProfile.pubxml b/DSACore/Properties/PublishProfiles/FolderProfile.pubxml
index 2fd07c5..2fd07c5 100644
--- a/dsa/DSACore/Properties/PublishProfiles/FolderProfile.pubxml
+++ b/DSACore/Properties/PublishProfiles/FolderProfile.pubxml
diff --git a/dsa/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml b/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml
index e03b55a..e03b55a 100644
--- a/dsa/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml
+++ b/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml
diff --git a/dsa/DSACore/Properties/launchSettings.json b/DSACore/Properties/launchSettings.json
index 2da5fec..2da5fec 100644
--- a/dsa/DSACore/Properties/launchSettings.json
+++ b/DSACore/Properties/launchSettings.json
diff --git a/dsa/DSACore/Startup.cs b/DSACore/Startup.cs
index ef22802..ef22802 100644
--- a/dsa/DSACore/Startup.cs
+++ b/DSACore/Startup.cs
diff --git a/dsa/DSACore/appsettings.Development.json b/DSACore/appsettings.Development.json
index e203e94..e203e94 100644
--- a/dsa/DSACore/appsettings.Development.json
+++ b/DSACore/appsettings.Development.json
diff --git a/dsa/DSACore/appsettings.json b/DSACore/appsettings.json
index dee968c..dee968c 100644
--- a/dsa/DSACore/appsettings.json
+++ b/DSACore/appsettings.json
diff --git a/DiscordBot/Auxiliary/CommandExtension.cs b/DiscordBot/Auxiliary/CommandExtension.cs
deleted file mode 100644
index 690f352..0000000
--- a/DiscordBot/Auxiliary/CommandExtension.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Discord;
-using Discord.Commands;
-
-namespace DiscordBot.Auxiliary
-{
- public static class CommandExtension
- {
- private static WebClient _client;
-
- public static async Task ReplyTimedAsync(this ModuleBase m, string message, TimeSpan time)
- {
- var token = message.GetHashCode();
- var send = m.Context.Channel.SendMessageAsync($"#{token}\n```xl\n{message}```");
-
- var barInvoker = new BackgroundWorker();
- barInvoker.DoWork += delegate
- {
- Thread.Sleep(time);
- Delete(token, m);
- };
-
- await send;
- barInvoker.RunWorkerAsync();
- }
-
- private static void Delete(int token, ModuleBase m)
- {
- var messagesAsync = m.Context.Channel.GetMessagesAsync();
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list) messages.AddRange(task.ToList());
-
- var test = messages.Where(x => x.Content.StartsWith($"#{token}\n") && x.Author.IsBot).Select(c => c);
- Task.WaitAll(test.Select(message => (message as IUserMessage)?.DeleteAsync()).ToArray());
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, bool directMessage = false)
- {
- var sb = new StringBuilder();
- foreach (var re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
- if (directMessage)
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- else
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if (directMessage)
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- else
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, TimeSpan time)
- {
- var sb = new StringBuilder();
- foreach (var re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
- await m.ReplyTimedAsync(sb.ToString(), time);
-
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- await m.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- }
-
- public static async Task SendWebFile(this IMessageChannel channel,
- string url = "https://i.imgur.com/0iHEycJ.png")
- {
- if (_client == null) _client = new WebClient();
-
- var stream = _client.OpenRead(url);
- await channel.SendFileAsync(stream, url.Split('/').Last());
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Auxiliary/Dice.cs b/DiscordBot/Auxiliary/Dice.cs
deleted file mode 100644
index c44e87e..0000000
--- a/DiscordBot/Auxiliary/Dice.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-
-namespace DiscordBot.Auxiliary
-{
- public static class Dice // roll it!
- {
- private static readonly Random Rnd = new Random();
-
- public static int Roll(int d = 20)
- {
- return Rnd.Next(d) + 1;
- }
-
-
- public static int Roll(int count, int d)
- {
- if (d <= 0) return 0;
-
- var sum = 0;
- for (var i = 0; i < Math.Abs(count); i++)
- {
- var roll = Roll(d);
- sum += roll;
- }
-
- sum *= Math.Abs(count) / count;
-
- return sum;
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Auxiliary/Permissions.cs b/DiscordBot/Auxiliary/Permissions.cs
deleted file mode 100644
index c2cb058..0000000
--- a/DiscordBot/Auxiliary/Permissions.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscordBot.Auxiliary
-{
- public static class Permissions
- {
- public static bool Check(ICommandContext c, string role)
- {
- return ((SocketGuildUser) c.User).Roles.ToList().Exists(v => v.Name.Equals(role));
- }
-
- public static bool Check(ICommandContext c, IEnumerable<string> roles)
- {
- return roles.Any(role => ((SocketGuildUser) c.User).Roles.ToList().Exists(v => v.Name.Equals(role)));
- }
-
- public static bool Test(ICommandContext c, string role)
- {
- if (Check(c, role)) return true;
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles)) c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Auxiliary/RandomMisc.cs b/DiscordBot/Auxiliary/RandomMisc.cs
deleted file mode 100644
index f7c5186..0000000
--- a/DiscordBot/Auxiliary/RandomMisc.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using System.Linq;
-using System.Text;
-
-namespace DiscordBot.Auxiliary
-{
- public static class RandomMisc
- {
- public static string Roll(string input)
- {
- var output = new StringBuilder();
- var strings = input.Split('w', 'd').ToList();
- var count = Convert.ToInt32(strings[0]);
- strings = strings[1].Split(' ').ToList();
- var d = Convert.ToInt32(strings[0]);
-
- if (strings.Count > 0)
- {
- }
-
- var sum = 0;
- for (var i = 0; i < count; i++)
- {
- var roll = Dice.Roll(d);
- sum += roll;
- output.Append("[" + roll + "] ");
- }
-
- if (strings.Count <= 1) return output.ToString();
- sum += Convert.ToInt32(strings[1]);
- output.Append("sum: " + sum);
-
- return output.ToString();
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Auxiliary/SpellCorrect.cs b/DiscordBot/Auxiliary/SpellCorrect.cs
deleted file mode 100644
index a2ba91a..0000000
--- a/DiscordBot/Auxiliary/SpellCorrect.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using System;
-using System.Diagnostics;
-
-namespace DiscordBot.Auxiliary
-{
- public class SpellCorrect : StringComparer
- {
- public const int ErrorThreshold = 94100;
-
- public override int Compare(string x, string y)
- {
- return CompareEasy(x, y);
- }
-
- public static int CompareEasy(string x, string y)
- {
- if (string.IsNullOrEmpty(x)) throw new ArgumentException("message", nameof(x));
-
- if (string.IsNullOrEmpty(y)) throw new ArgumentException("message", nameof(y));
-
- if (x.Equals(y)) return 0;
-
- x = x.ToLower();
- y = y.ToLower();
- if (x.Equals(y)) return 1;
-
- var subs = y.Split(' ', '/');
- var score = subs.Length;
- foreach (var s in subs)
- if (s.Equals(x))
- score--;
-
- if (score < subs.Length) return score + 1;
-
- return 100000 - (int) (CompareExact(x, y) * 1000.0);
- /*if (y.Contains(x))
- return 6;*/
- }
-
- public override bool Equals(string x, string y)
- {
- Debug.Assert(x != null, nameof(x) + " != null");
- return x.Equals(y);
- }
-
- public override int GetHashCode(string obj)
- {
- throw new NotImplementedException();
- }
-
- public static double CompareExact(string s, string q)
- {
- s = s.ToLower();
- q = q.ToLower();
-
- int i, j;
- const double match = 3.0;
- const double gap = -2.0;
- const double mismatch = -2.0;
-
- double decay;
-
- var matrix = new double[s.Length + 1, q.Length + 1];
- var max = 0.0;
- matrix[0, 0] = 0.0;
-
- for (i = 1; i < s.Length; i++)
- // matrix[i, 0] = 0.0;
- matrix[i, 0] = i * gap;
-
- for (i = 1; i < q.Length; i++) matrix[0, i] = 0.0;
-
-
- for (i = 1; i <= s.Length; i++)
- for (j = 1; j <= q.Length; j++)
- {
- decay = j / (double) (s.Length * 1000);
- var add = s[i - 1] == q[j - 1] ? match - decay : mismatch;
- var score = matrix[i - 1, j - 1] + add;
-
- if (score < matrix[i - 1, j] + gap) score = matrix[i - 1, j] + gap;
-
- if (score < matrix[i, j - 1] + gap) score = matrix[i, j - 1] + gap;
-
- if (i > 1 && j > 1)
- if (s[i - 1] == q[j - 2] && s[i - 2] == q[j - 1])
- {
- add = 3 / 2.0 * match - decay;
- if (score < matrix[i - 2, j - 2] + add) score = matrix[i - 2, j - 2] + add;
- }
-
- // if (score < 0)
- // {
- // score = 0;
- // }
-
- if (max < score && i == s.Length) max = score;
-
- matrix[i, j] = score;
- }
-
- return max;
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/CommandHandler.cs b/DiscordBot/CommandHandler.cs
deleted file mode 100644
index b41756f..0000000
--- a/DiscordBot/CommandHandler.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-#region
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Http;
-using System.Reflection;
-using System.Threading.Tasks;
-using Discord.Commands;
-using Discord.WebSocket;
-
-#endregion
-
-namespace DiscordBot
-{
- public class CommandHandler
- {
- private static readonly HttpClient _HttpClient = new HttpClient();
- private readonly DiscordSocketClient _client;
- private readonly CommandService _commands;
-
- public CommandHandler(DiscordSocketClient client, CommandService commands) {
- _commands = commands;
- _client = client;
- }
-
- public Task InstallCommandsAsync() {
- // Hook the MessageReceived event into our command handler
- _client.MessageReceived += HandleCommandAsync;
-
- // Here we discover all of the command modules in the entry
- // assembly and load them. Starting from Discord.NET 2.0, a
- // service provider is required to be passed into the
- // module registration method to inject the
- // required dependencies.
- //
- // If you do not use Dependency Injection, pass null.
- // See Dependency Injection guide for more information.
- return _commands.AddModulesAsync(Assembly.GetEntryAssembly(),
- null);
- }
-
-
- private static async Task<string> SendCommand(string name, string command, string url) {
- command = command.Remove(0, 1);
- var args = command.Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);
-
- string cmdContent = string.Empty;
- if (args.Length > 1) {
- cmdContent = "\"" + args.Skip(1).Aggregate((s, n) => s + "\", \"" + n) + "\"";
- }
-
- var values = new Dictionary<string, string> {
- {"Name", name},
- {"CmdIdentifier", args.First()},
- {"CmdTexts", "[" + cmdContent + "]"}
- };
-
- var content = new FormUrlEncodedContent(values);
-
- var response = await _HttpClient.PostAsync(url, content);
-
- return await response.Content.ReadAsStringAsync();
- }
-
- private async Task HandleCommandAsync(SocketMessage messageParam) {
- // Don't process the command if it was a system message
- var message = messageParam as SocketUserMessage;
- if (message == null) {
- return;
- }
-
- // Create a number to track where the prefix ends and the command begins
- var argPos = 0;
-
- // Determine if the message is a command based on the prefix and make sure no bots trigger commands
- if (!(message.HasCharPrefix('!', ref argPos) ||
- message.HasMentionPrefix(_client.CurrentUser, ref argPos)) ||
- message.Author.IsBot) {
- return;
- }
-
- // Create a WebSocket-based command context based on the message
- var context = new SocketCommandContext(_client, message);
-
- // Execute the command with the command context we just
- // created, along with the service provider for precondition checks.
-
- // Keep in mind that result does not indicate a return value
- // rather an object stating if the command executed successfully.
- var result = await _commands.ExecuteAsync(
- context,
- argPos,
- null);
-
- // Optionally, we may inform the user if the command fails
- // to be executed; however, this may not always be desired,
- // as it may clog up the request queue should a user spam a
- // command.
-
- if (result.Error == CommandError.UnknownCommand) {
- string response = await SendCommand(message.Author.Username, message.Content,
- "https://kobert.dev/api/dsa/commands");
- //var response = "invalid";
- await context.Channel.SendMessageAsync(response);
- }
- else if (!result.IsSuccess) {
- await context.Channel.SendMessageAsync(result.ErrorReason);
- }
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Commands/CommandHelper.cs b/DiscordBot/Commands/CommandHelper.cs
deleted file mode 100644
index 162c65d..0000000
--- a/DiscordBot/Commands/CommandHelper.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-namespace DiscoBot.Auxiliary
-{
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
-
- using Discord;
- using Discord.Commands;
-
- public static class CommandHelper
- {
- private static WebClient client;
-
- public static async Task ReplyTimedAsync(this ModuleBase m, string message, TimeSpan time)
- {
- var token = message.GetHashCode();
- var send = m.Context.Channel.SendMessageAsync($"#{token}\n```xl\n{message}```", false);
-
- var barInvoker = new BackgroundWorker();
- barInvoker.DoWork += delegate
- {
- Thread.Sleep(time);
- Delete(token, m);
- };
-
- await send;
- barInvoker.RunWorkerAsync();
- }
-
- private static void Delete(int token, ModuleBase m)
- {
- var messagesAsync = m.Context.Channel.GetMessagesAsync();
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list)
- {
- messages.AddRange(task.ToList());
- }
-
- var test = messages.Where(x => x.Content.StartsWith($"#{token}\n") && x.Author.IsBot).Select(c=>c );
- var waiters = new List<Task>();
- foreach (var message in test)
- {
- waiters.Add((message as IUserMessage).DeleteAsync());
- }
- Task.WaitAll(waiters.ToArray());
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, bool directMessage = false)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if (directMessage)
- {
- await m.Context.User.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- else
- {
- await m.Context.Channel.SendMessageAsync("```xl\n" + sb + "\n```");
- }
- }
-
- public static async Task ReplyAsync(this ModuleBase m, IEnumerable<string> message, TimeSpan time)
- {
- var sb = new StringBuilder();
- foreach (string re in message)
- {
- if (sb.Length + re.Length > 1798)
- {
-
- await m.ReplyTimedAsync(sb.ToString(), time);
-
-
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- await m.ReplyTimedAsync(sb.ToString(), TimeSpan.FromSeconds(90));
- }
-
- public static async Task SendWebFile(this IMessageChannel channel, string url = "https://i.imgur.com/0iHEycJ.png")
- {
- if (client == null)
- {
- client = new WebClient();
- }
-
- Stream stream = client.OpenRead(url);
- await channel.SendFileAsync(stream, url.Split('/').Last());
- }
- }
-}
diff --git a/DiscordBot/Commands/FileHandler.cs b/DiscordBot/Commands/FileHandler.cs
deleted file mode 100644
index e3cd82d..0000000
--- a/DiscordBot/Commands/FileHandler.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Linq;
-using Discord.Commands;
-
-namespace DiscordBot.Commands
-{
- public class FileHandler : ModuleBase
- {
- //[Command("send"), Summary("fügt Helden hinzu")]
- public void AddChar()
- {
- var msg = Context.Message;
- if (msg.Attachments == null) throw new ArgumentException("Es wurde keine Datei angehängt");
-
- var attachments = msg.Attachments.ToList();
-
- if (!attachments.Any(x => x.Filename.EndsWith(".xml")))
- throw new ArgumentException("Es wurde kein xml Held mitgeschickt");
-
- foreach (var attachment in attachments.Where(x => x.Filename.EndsWith(".xml")))
- throw new NotImplementedException("send File to Server");
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/Commands/MiscCommands.cs b/DiscordBot/Commands/MiscCommands.cs
deleted file mode 100644
index 5707de7..0000000
--- a/DiscordBot/Commands/MiscCommands.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using DiscoBot.Auxiliary;
-using Discord;
-using Discord.Commands;
-using DiscordBot.Auxiliary;
-
-namespace DiscordBot.Commands
-{
- public class MiscCommands : ModuleBase
- {
- [Command("r")]
- [Summary("Würfelt ")]
- [Alias("R", "Roll", "roll", "Würfle")]
- public Task RollAsync([Remainder] [Summary("Weapon")] string roll)
- {
- //return this.ReplyAsync("```xl\n" + new Auxiliary.Calculator.StringSolver(roll).Solve() + "\n```");
- return ReplyAsync("```xl\n" + RandomMisc.Roll(roll) + "\n```");
- }
-
-
- [Command("say")]
- [Summary("Echos a message.")]
- [Alias("s")]
- public Task SayAsync([Remainder] [Summary("The text to echo")]
- string echo)
- {
- return ReplyAsync(echo);
- }
-
- [Command("liebe")]
- [Summary("Echos a message.")]
- [Alias("Liebe", "<3", "love")]
- public async Task LoveAsync()
- {
- var rand = new Random();
- var user = Context.Channel.GetUsersAsync().ToList().Result.ToList().First()
- .Where(x => x.Status != UserStatus.Offline).OrderBy(x => rand.Next()).First();
- await ReplyAsync(
- ":heart: :heart: :heart: Verteilt die Liebe! :heart: :heart: :heart: \n Besondere Liebe geht an " +
- user.Username);
- //await this.ReplyAsync("!liebe");
- }
-
- [Command("maul")]
- [Summary("Echos a message.")]
- public Task MaulAsync()
- {
- return ReplyAsync(
- "Maul...? Du meintest doch sicher Maulwürfe oder? \n:heart: :heart: :heart: \nGanz viel Liebe für Maulwürfe !\n:heart: :heart: :heart:");
- }
-
-
- [Command("match")]
- [Summary("Tinder.")]
- [Alias("mach", "pass", "passt")]
- public Task TinderAsync(string s1, string s2)
- {
- var rand = new Random((s1 + s2).GetHashCode());
-
- var wert = Math.Log10(Math.Floor(1000.0 * (SpellCorrect.CompareExact(s1, s2) + rand.NextDouble() * 10.0)) /
- 1000.0);
- wert = wert * 100.0 < 100.0 ? wert * 100.0 : 100.0 - wert;
- wert = wert < 0 ? -wert : wert;
- return ReplyAsync($"Ihr passt zu {Math.Floor(100.0 * wert) / 100.0}% zusammen");
- }
-
- [Command("reddit")]
- [Summary("Reddit.")]
- public Task RedditAsync()
- {
- return ReplyAsync(
- "Ein Archiv der Vergangenen Aktionen findet man hier: https://www.reddit.com/r/ReconquistaInternet/");
- }
-
- [Command("compare")]
- [Summary("Echos a message.")]
- public async Task KickAsync()
- {
- //await this.Context.Guild.DownloadUsersAsync();
- var users = Context.Guild.GetUsersAsync();
- var test = File.ReadAllLines("RG.txt");
- await users;
- var us = users.Result.Select(x => x.Username);
-
- var lines = test.Where(x => !x.Equals(string.Empty)).ToList();
-
-
- var sc = new SpellCorrect();
-
- var res = new List<string>();
-
- foreach (var line in lines)
- {
- var best = us.OrderBy(user => sc.Compare(user, line)).First();
-
- double fit = sc.Compare(best, line);
-
- if (!(fit < SpellCorrect.ErrorThreshold - 20000)) continue;
- res.Add(fit.Equals(0) ? $"@\t{best} !!! => {line}" : $"-\t{best} hat Ähnlichkeit mit: {line}");
- }
-
- var sb = new StringBuilder();
- foreach (var re in res)
- {
- if (sb.Length + re.Length > 1798)
- {
- await CommandHelper.ReplyTimedAsync(this, sb.ToString(), TimeSpan.FromSeconds(90));
- sb.Clear();
- }
-
- sb.AppendLine(re);
- }
-
- if (Permissions.Check(Context, new[] {"Admin", "Mod"}))
- await CommandHelper.ReplyTimedAsync(this, sb.ToString(), TimeSpan.FromSeconds(90));
-
- //await this.ReplyAsync($"{count} Duplikate gefunden");
- }
-
-
- [Command("clear")]
- [Summary("Cleans up messages.")]
- public void DeleteAsync(int count)
- {
- var messagesAsync = Context.Channel.GetMessagesAsync(count);
- if (messagesAsync != null)
- {
- Task.WaitAll(messagesAsync.ToArray());
- var list = messagesAsync.ToEnumerable().ToList();
- var messages = new List<IMessage>();
- foreach (var task in list) messages.AddRange(task.ToList());
-
- if (Permissions.Check(Context, new[] {"Admin", "Mod", "Meister"}))
- {
- var waiters = new List<Task>();
- foreach (var message in messages) waiters.Add(((IUserMessage) message).DeleteAsync());
-
- Task.WaitAll(waiters.ToArray());
- }
- }
- }
-
- [Command("check")]
- [Summary("Echos a message.")]
- [Alias("Check")]
- public async Task CheckAsync(string quarry)
- {
- var perm = new List<string> {"Admin", "Mod", "Privatpolizei"};
-
- Permissions.Test(Context, perm.ToArray());
-
- var test = File.ReadAllLines("RG.txt");
-
- var lines = test.Where(x => !x.Equals(string.Empty)).ToList();
-
-
- var sc = new SpellCorrect();
- var count = lines.OrderBy(line => sc.Compare(quarry, line)).First();
-
- var fit = sc.Compare(count, quarry);
-
- string antwort;
-
- antwort = fit < SpellCorrect.ErrorThreshold - 20000
- ? $"```xl\nAuf anderem Server Match gefunden: {count}"
- : $"```xl\nAuf anderem Server Kein Match gefunden: {quarry}";
-
-
- var users = Context.Guild.GetUsersAsync();
- await users;
- var us = users.Result.Select(x => x.Username);
-
- sc = new SpellCorrect();
- count = us.OrderBy(line => sc.Compare(quarry, line)).First();
-
- fit = sc.Compare(count, quarry);
-
- antwort = fit < SpellCorrect.ErrorThreshold - 20000
- ? $"{antwort}\nAuf unserem Server Match gefunden: {count}\n```"
- : $"{antwort}\nAuf unserem Server Kein Match gefunden: {quarry} \n```";
-
- await ReplyAsync(antwort);
- }
- }
-} \ No newline at end of file
diff --git a/DiscordBot/DiscordBot.csproj b/DiscordBot/DiscordBot.csproj
deleted file mode 100644
index 620a3a6..0000000
--- a/DiscordBot/DiscordBot.csproj
+++ /dev/null
@@ -1,12 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <OutputType>Exe</OutputType>
- <TargetFramework>netcoreapp2.2</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Discord.Net" Version="2.1.0" />
- </ItemGroup>
-
-</Project>
diff --git a/DiscordBot/Program.cs b/DiscordBot/Program.cs
deleted file mode 100644
index 60febcd..0000000
--- a/DiscordBot/Program.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Threading.Tasks;
-using Discord;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscordBot
-{
- class Program
- {
- public static void Main(string[] args)
- => new Program().MainAsync().GetAwaiter().GetResult();
-
- private DiscordSocketClient _client;
- private CommandHandler cHandler;
-
- public async Task MainAsync()
- {
- _client = new DiscordSocketClient();
-
- _client.Log += Log;
-
-
- cHandler = new CommandHandler(_client, new CommandService());
- // Remember to keep token private or to read it from an
- // external source! In this case, we are reading the token
- // from an environment variable. If you do not know how to set-up
- // environment variables, you may find more information on the
- // Internet or by using other methods such as reading from
- // a configuration.
- await cHandler.InstallCommandsAsync();
-
- try
- {
- await _client.LoginAsync(TokenType.Bot,
- Environment.GetEnvironmentVariable("DiscordToken"));
- }
- catch
- {
- await _client.LoginAsync(TokenType.Bot, File.ReadAllText("Token"));
- }
-
- await _client.StartAsync();
-
- // Block this task until the program is closed.
- await Task.Delay(-1);
- }
-
- private Task Log(LogMessage msg)
- {
- Console.WriteLine(msg.ToString());
- return Task.CompletedTask;
- }
- }
-}
diff --git a/DiscordBot/Rework/Permissions.cs b/DiscordBot/Rework/Permissions.cs
deleted file mode 100644
index 119e628..0000000
--- a/DiscordBot/Rework/Permissions.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System.Linq;
-using Discord.Commands;
-using Discord.WebSocket;
-
-namespace DiscordBot.Rework
-{
- public static class Permissions
- {
- public static bool Check(ICommandContext c, string role)
- {
- return ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role));
- }
-
- public static bool Check(ICommandContext c, string[] roles)
- {
- return roles.Any(role => ((SocketGuildUser)c.User).Roles.ToList().Exists(v => v.Name.Equals(role)));
- }
-
- public static bool Test(ICommandContext c, string role)
- {
- if (!Check(c, role))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- return false;
- }
-
- return true;
- }
-
- public static void Test(ICommandContext c, string[] roles)
- {
- if (!Check(c, roles))
- {
- c.Channel.SendMessageAsync("```xl\n Keine ausreichenden Berechtigungen\n```").Wait();
- }
- }
- }
-}
diff --git a/database.rules.json b/database.rules.json
deleted file mode 100644
index f54493d..0000000
--- a/database.rules.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- /* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
- "rules": {
- ".read": false,
- ".write": false
- }
-} \ No newline at end of file
diff --git a/dsa/DSACore/PropertiesDSALib-Auxiliary-CommandInfo.json b/dsa/DSACore/PropertiesDSALib-Auxiliary-CommandInfo.json
deleted file mode 100644
index b9941f2..0000000
--- a/dsa/DSACore/PropertiesDSALib-Auxiliary-CommandInfo.json
+++ /dev/null
@@ -1,101 +0,0 @@
-[
- {
- "Name": "ich bin",
- "Scope": "All",
- "Brief": "Setzt den gespielten Charakter fest",
- "Description": [
- "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n",
- " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n",
- " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n",
- " !ich bin Zalibius Wechsel zum Helden Zalibius\n",
- " !ich Rhoktar Orkische Variante von !ich bin.\n",
- " Wechselt zu Rhoktar.\n\n",
- " !list chars Zeigt die Liste verfügbarer Charaktere.\n",
- " \n"
- ]
- },
- {
- "Name": "List",
- "Scope": "All",
- "Brief": "Anzeige vonSpielrelevanten Listen",
- "Description": [
- "Mit \"!list\" lassen sich spielrelevante Listen ausgeben. Die Angezeigte Liste wird nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !list chars Liste aller verfügbaren Helden (eingelesen per *.xml)\n",
- " und NSCs.\n",
- " (Mit \"!ich bin\" kann der Held ausgewählt werden.)\n",
- " !list commands Liste aller verwendbaren Bot-Kommandos.\n",
- " !list sounds Liste der Soundeffekte."
- ]
- },
- {
- "Name": "Held",
- "Scope": "All",
- "Brief": "Anzeige von Heldenwerten",
- "Description": [
- "Mit \"!Held\" lassen sich Heldenwerte ausgeben. Mehrere Werte können gleichzeitig angefordert werde. \"!Held LE Waffen\" liefert so z.B. Informationen zur Lebensenergie und den Kampfwerten.\n Bis auf wenige Ausnahmen wird die Angezeigte Liste nach einiger Zeit wieder gelöscht.\n",
- "\n",
- " !Held Zeigt den Heldenbrief an.\n",
- " (Diese Liste wird nicht automatisch gelöscht)\n",
- " !Held Eigenschaften Zeigt die Eigenschaften MU/KL/CH/IN/KK/GE/FF/KO.\n",
- " !Held e Kurzform von \"!Held Eigenschaften\".\n",
- " !Held LE Zeigt LE an.\n",
- " !Held AE Zeigt AE an.\n",
- " !Held stats Zeigt Eigenschaften und zusätzlich SO/LE/AE.\n",
- " !Held Kampfwerte Zeigt AT/PA für aktivierte Waffentalente.\n",
- " !Held Waffe/!list w Kurzformen von \"!Held Kampfwerte\".\n",
- " !Held Vorteile Zeigt Vor- und Nachteile an.\n",
- " !Held v Kurzform von \"!Held Vorteile\".\n",
- " !Held Talente Zeigt die Liste aller aktivierten Talente, deren TaW,\n",
- " sowie die Probe.\n",
- " !Held t Kurzform von \"!Held Talente\".\n",
- " !Held Zauber Zeigt die Liste aller aktivierten Zauber, deren ZaW,\n",
- " sowie die Probe.\n",
- " !Held z Kurzform von \"!Held Zauber\".\n"
- ]
- },
- {
- "Name": "LE",
- "Scope": "All",
- "Brief": "Ändert dein Leben - im wahrsten Sinne des Wortes",
- "Description": [
- "Mit !LE zeigt man die Lebensenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !LE Zeigt Lebensenergie an\n",
- " !LE 30 Setzt LE auf 30\n",
- " !LE +5 Erhöht LE um 5 (bis zum Maximum)\n",
- " !LE ++5 Erhöht LE um 5 (ignoriert Maximum)\n",
- " !LE -5 Verringert LE um 5\n \n"
- ]
- },
- {
- "Name": "AE",
- "Scope": "All",
- "Brief": "Ändert Astralenergie",
- "Description": [
- "Mit !AE (oder !Asp) zeigt man die Astralenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n",
- " !AE Zeigt Astralenergie an\n",
- " !AE 30 Setzt Asp auf 30\n",
- " !AE +5 Erhöht Asp um 5 (bis zum Maximum)\n",
- " !AE ++5 Erhöht Asp um 5 (ignoriert Maximum)\n",
- " !AE -5 Verringert Asp um 5 (Minimum 0)\n"
- ]
- },
- {
- "Name": "Gm",
- "Scope": "Meister",
- "Brief": "Kontrolliere andere Charaktere",
- "Description": [
- "Mit !GM fürhrt man commands als eine andere Person aus.",
- " !GM [charaktername] [command] [commandattribut] [mofifier]",
- " Unterstützte [commands]'s:",
- " !GM [name] LE",
- " !GM [name] AE",
- " !GM [name] Talent",
- " !GM [name] Fernkampf",
- " !GM [name] Eigenschaft",
- " !GM [name] Zauber",
- " !GM [name] Angriff",
- " !GM [name] Parade"
- ]
- }
-] \ No newline at end of file
diff --git a/dsa/DSACore/PropertiesDSALib-DSA_Game-Characters-Character.json b/dsa/DSACore/PropertiesDSALib-DSA_Game-Characters-Character.json
deleted file mode 100644
index fd387f5..0000000
--- a/dsa/DSACore/PropertiesDSALib-DSA_Game-Characters-Character.json
+++ /dev/null
@@ -1,290 +0,0 @@
-[
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 30,
- "Lebenspunkte_Aktuell": 30,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 20,
- "Astralpunkte_Aktuell": 20,
- "Name": "Felis Exodus Schattenwald"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 29,
- "Lebenspunkte_Aktuell": 29,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Gardist"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 31,
- "Lebenspunkte_Aktuell": 31,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Hartmut Reiher"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 21,
- "Lebenspunkte_Aktuell": 21,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 35,
- "Astralpunkte_Aktuell": 35,
- "Name": "Helga vom Drachenei, Tausendsasserin"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 25,
- "Lebenspunkte_Aktuell": 25,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Krenko"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 39,
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 0,
- "Astralpunkte_Aktuell": 0,
- "Name": "Ledur Torfinson"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 26,
- "Lebenspunkte_Aktuell": 26,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 13,
- "Astralpunkte_Aktuell": 13,
- "Name": "Morla"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 28,
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 40,
- "Astralpunkte_Aktuell": 40,
- "Name": "Numeri Illuminus"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 39,
- "Lebenspunkte_Aktuell": 39,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 16,
- "Astralpunkte_Aktuell": 16,
- "Name": "Potus"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 18,
- "Lebenspunkte_Aktuell": 18,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 13,
- "Astralpunkte_Aktuell": 13,
- "Name": "Pump aus der Gosse"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 34,
- "Lebenspunkte_Aktuell": 34,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 17,
- "Astralpunkte_Aktuell": 17,
- "Name": "Rhoktar4"
- },
- {
- "Eigenschaften": {},
- "Talente": [],
- "Zauber": [],
- "Kampftalente": [],
- "Vorteile": [],
- "PropTable": {
- "MU": "Mut",
- "KL": "Klugheit",
- "IN": "Intuition",
- "CH": "Charisma",
- "FF": "Fingerfertigkeit",
- "GE": "Gewandtheit",
- "KO": "Konstitution",
- "KK": "Körperkraft"
- },
- "Lebenspunkte_Basis": 28,
- "Lebenspunkte_Aktuell": 28,
- "Ausdauer_Basis": 0,
- "Ausdauer_Aktuell": 0,
- "Astralpunkte_Basis": 43,
- "Astralpunkte_Aktuell": 43,
- "Name": "Volant"
- }
-] \ No newline at end of file
diff --git a/dsa/DSACore/PropertiesNewtonsoft-Json-Linq-JProperty.json b/dsa/DSACore/PropertiesNewtonsoft-Json-Linq-JProperty.json
deleted file mode 100644
index 0ed0f48..0000000
--- a/dsa/DSACore/PropertiesNewtonsoft-Json-Linq-JProperty.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "$schema": "http://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:2170",
- "sslPort": 44365
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "api/commands",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "DSACore": {
- "commandName": "Project",
- "launchBrowser": true,
- "launchUrl": "api/commands",
- "applicationUrl": "https://0.0.0.0:5001;http://0.0.0.0:5000",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-} \ No newline at end of file
diff --git a/dsa/DSACore/Token b/dsa/DSACore/Token
deleted file mode 100644
index eb02248..0000000
--- a/dsa/DSACore/Token
+++ /dev/null
@@ -1 +0,0 @@
-fBhKAyCEJlqqU1l6gS1LNWwEZByQ23oAWbvtXXB5 \ No newline at end of file
diff --git a/dsa/DiscoBot.sln b/dsa/DiscoBot.sln
new file mode 100644
index 0000000..a6b258a
--- /dev/null
+++ b/dsa/DiscoBot.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28803.452
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSACore", "..\DSACore\DSACore.csproj", "{35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FireBase", "FireBase\FireBase.csproj", "{87CC30E6-CBEA-4282-A3CC-FD5119A1993B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSALib", "DSALib\DSALib.csproj", "{C5D9AFDF-70E2-4A47-96FF-1EC47C1DE38D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NUnitTest", "NUnitTestProject1\NUnitTest.csproj", "{CF821E64-B50E-420F-98A2-07315B362ED0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35A5E2CC-0FD4-4BC0-ACBF-38599CAED1C4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87CC30E6-CBEA-4282-A3CC-FD5119A1993B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87CC30E6-CBEA-4282-A3CC-FD5119A1993B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87CC30E6-CBEA-4282-A3CC-FD5119A1993B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87CC30E6-CBEA-4282-A3CC-FD5119A1993B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5D9AFDF-70E2-4A47-96FF-1EC47C1DE38D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5D9AFDF-70E2-4A47-96FF-1EC47C1DE38D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5D9AFDF-70E2-4A47-96FF-1EC47C1DE38D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5D9AFDF-70E2-4A47-96FF-1EC47C1DE38D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CF821E64-B50E-420F-98A2-07315B362ED0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CF821E64-B50E-420F-98A2-07315B362ED0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CF821E64-B50E-420F-98A2-07315B362ED0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CF821E64-B50E-420F-98A2-07315B362ED0}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CADA01A3-B80B-4979-8397-7CB5B825CE34}
+ EndGlobalSection
+EndGlobal
diff --git a/firebase.json b/firebase.json
deleted file mode 100644
index bc9ddf4..0000000
--- a/firebase.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "database": {
- "rules": "database.rules.json"
- },
- "firestore": {
- "rules": "firestore.rules",
- "indexes": "firestore.indexes.json"
- },
- "hosting": {
- "public": "Webinterface/NodeJSServer/dist",
- "ignore": [
- "firebase.json",
- "**/.*",
- "**/node_modules/**"
- ]
- },
- "storage": {
- "rules": "storage.rules"
- }
-}
diff --git a/firestore.indexes.json b/firestore.indexes.json
deleted file mode 100644
index b19e92b..0000000
--- a/firestore.indexes.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "indexes": []
-} \ No newline at end of file
diff --git a/firestore.rules b/firestore.rules
deleted file mode 100644
index b76ec00..0000000
--- a/firestore.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-service cloud.firestore {
- match /databases/{database}/documents {
- match /{document=**} {
- allow read, write;
- }
- }
-} \ No newline at end of file
diff --git a/storage.rules b/storage.rules
deleted file mode 100644
index d494542..0000000
--- a/storage.rules
+++ /dev/null
@@ -1,7 +0,0 @@
-service firebase.storage {
- match /b/{bucket}/o {
- match /{allPaths=**} {
- allow read, write: if request.auth!=null;
- }
- }
-}