public async Task ScheduleTask(string values, int tim1 = -1, int tim2 = -1, int tim3 = -1) { int minutes = 0, hours = 0, days = 0; if (tim3 == -1) { if (tim2 == -1) { if (tim1 == -1) { return; } else { minutes = tim1; } } else { hours = tim1; minutes = tim2; } } else { days = tim1; hours = tim2; minutes = tim3; } string user = Context.User.Username; string task = "none"; string final = $"{DateTime.Now.AddDays(days).AddHours(hours).AddMinutes(minutes).ToString("yyyy/MM/dd hh:mm")}‰{task}‰{user}‰{values}"; var result = XmlReader.AppendToTextFile(@"C:\Dev\Discord\TheNewBot\TheNewBot\Lists\ScheduledStuff.txt", final); if (result) { await ReplyAsync($"alright **{Context.User.Username}**, ''{values}'' is scheduled for {days} days, {hours} hours and {minutes} minutes"); } }