Exemplo n.º 1
0
        public async Task archive()
        {
            p.doAction(Context.User, Context.Guild.Id, Program.Module.Settings);
            if (Context.User.Id != 144851584478740481)
            {
                await ReplyAsync(Sentences.onlyMasterStr(Context.Guild.Id));
            }
            else
            {
                await ReplyAsync(Sentences.copyingFiles(Context.Guild.Id));

                if (!Directory.Exists("Archives"))
                {
                    Directory.CreateDirectory("Archives");
                }
                string currTime = DateTime.UtcNow.ToString("yy-MM-dd-HH-mm-ss");
                Directory.CreateDirectory("Archives/" + currTime);
                copyContent("Saves", "Archives/" + currTime);
                await ReplyAsync(Sentences.createArchiveStr(Context.Guild.Id, currTime));
            }
        }