Ejemplo n.º 1
0
        public async Task AreaListOption_Realm3rd(string areaname, string option, string choice)
        {
            //サーバーID等の変数の宣言
            string serverfolder = $@"R:\Project\RUMM.warehouse\{Context.Guild.Id}";

            string datafolder      = $@"{serverfolder}\Data";
            string datafolder_area = $@"{datafolder}\Area";
            string area_text       = $@"{datafolder_area}\{areaname}.txt";

            string trimedfolder     = $@"{serverfolder}\Trimed";
            string trimedfolder_map = $@"{trimedfolder}\TrimedMap";

            string completedfolder        = $@"{serverfolder}\Completed";
            string areafolder             = $@"{completedfolder}\AreaMap\{areaname}";
            string area_completedmap_list = $@"{areafolder}\{areaname}[list].png";

            if (option == "list")
            {
                switch (choice)
                {
                case "text":
                    if (File.Exists(area_text))
                    {
                        await Context.Channel.SendFileAsync(area_text);

                        await Context.Channel.SendSuccessAsync("完了", $"{areaname}の座標リストだよ!");
                    }
                    else
                    {
                        await Context.Channel.SendErrorAsync("エラー", $"そんな名前のエリアはないよ...? \r\n `r.rarea add {areaname}`でエリアを追加してみよ!");
                    }
                    break;

                case "map":
                    if (File.Exists(area_text))
                    {
                        Integrate.Designed_Realm3rd_Area_WithCoord(area_text, trimedfolder_map, area_completedmap_list);

                        await Context.Channel.SendFileAsync(area_completedmap_list);

                        await Context.Channel.SendSuccessAsync("完了", $"これが{areaname}の座標付き地図だよ!");
                    }
                    else
                    {
                        await Context.Channel.SendErrorAsync("エラー", $"そんな名前のエリアはないよ...? \r\n `r.rarea add {areaname}`でエリアを追加してみよう!");
                    }
                    break;
                }
            }
        }