summaryrefslogtreecommitdiff
path: root/DiscoBot/Commands
diff options
context:
space:
mode:
authorKobert-P <kassiaK@yahoo.de>2018-06-07 00:20:01 +0200
committerKobert-P <kassiaK@yahoo.de>2018-06-07 00:20:01 +0200
commit111b46289213b293f0977060588a90f880b3852e (patch)
tree9dc2332ec2d693230e562285d17fcdcd34d907a5 /DiscoBot/Commands
parent3868faeccf5036ca774175e1b43123dd967be9cd (diff)
#2 Spieler können ihren Charakter nun wechseln
Diffstat (limited to 'DiscoBot/Commands')
-rw-r--r--DiscoBot/Commands/Gm.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/DiscoBot/Commands/Gm.cs b/DiscoBot/Commands/Gm.cs
index 25cda92..8a3c2df 100644
--- a/DiscoBot/Commands/Gm.cs
+++ b/DiscoBot/Commands/Gm.cs
@@ -8,7 +8,36 @@
using Discord.Commands;
- public class Gm : ModuleBase
+ public class Iam : ModuleBase
+ {
+
+ [Command("Iam"), Summary("Wechselt den Character")]
+ [Alias("iam", "I_am", "i_am", "IchBin", "ichbin", "Ichbin", "Ich_bin", "ich_bin", "Ich", "ich", "I", "i" )]
+ public async Task Change_Character(string given_name, string ups ="", string ups2 = "", string ups3 = "", string ups4 = "")
+ {
+ string res = "";
+ string name ="Nobody";
+ if ( ( given_name.ToLower().Equals("bin") || given_name.ToLower().Equals("am") ) && ups.Length > 0)
+ {
+ name = ups + ups2 + ups3 + ups4;
+ }
+ else{
+ name = given_name+ups + ups2 + ups3 + ups4;
+ }
+
+ var comp = new SpellCorrect();
+ var character = Dsa.Chars.OrderBy(x => comp.Compare(name, x.Name)).First();
+
+ Dsa.Relation[this.Context.User.Username] = character.Name;
+ res += (" \nWillkommen " + character.Name + "!\n \n");
+
+ await this.ReplyAsync("```xl\n" + res + "\n```");
+ }
+
+ }
+
+
+ public class Gm : ModuleBase
{
public static string CheckCommand(string name, CommandTypes command, string waffe, int erschwernis = 0)
{