From 68e49d3b0936101deba1251e95b9788716c0722a Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 18 Jun 2018 11:39:41 +0200 Subject: reworked Properties, to split each fiel into a different File --- DiscoBot/DSA_Game/Save/SaveCommand.cs | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 DiscoBot/DSA_Game/Save/SaveCommand.cs (limited to 'DiscoBot/DSA_Game/Save/SaveCommand.cs') diff --git a/DiscoBot/DSA_Game/Save/SaveCommand.cs b/DiscoBot/DSA_Game/Save/SaveCommand.cs new file mode 100644 index 0000000..310d38a --- /dev/null +++ b/DiscoBot/DSA_Game/Save/SaveCommand.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot.DSA_Game.Save +{ + using System.IO; + using System.Net.Http; + + using DiscoBot.Auxiliary; + + using Discord.Commands; + + public class SaveCommand : ModuleBase + { + [Command("save"), Summary("Save Session")] + public async Task ReportAsync() + { + + + await this.ReplyAsync($"Dein report wurde hinzugefügt"); + } + + [Command("save"), Summary("Save Session")] + public async Task ReportAsync([Remainder, Summary("Session Name")] string name) + { + if (name.Equals("?")) + { + await this.ReplyAsync($"Gespeicherte Sessions:"); + await this.ReplyAsync(this.ListSessions()); + } + } + + private string[] ListSessions() + { + return Directory.GetDirectories(@"..\..\sessions"); + } + + + } +} -- cgit v1.2.3-54-g00ecf