|
|
@ -3,12 +3,14 @@ using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using System.Security; |
|
|
|
using System.Security; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
using Discord; |
|
|
|
using Kehyeedra3.Services.Models; |
|
|
|
using Kehyeedra3.Services.Models; |
|
|
|
|
|
|
|
|
|
|
|
namespace Kehyeedra3.Services |
|
|
|
namespace Kehyeedra3.Services |
|
|
|
{ |
|
|
|
{ |
|
|
|
public class ReminderService |
|
|
|
public class ReminderService |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
static IDMChannel LanChannel; |
|
|
|
private static async Task SendReminderAsync(Reminder reminder) |
|
|
|
private static async Task SendReminderAsync(Reminder reminder) |
|
|
|
{ |
|
|
|
{ |
|
|
|
try { |
|
|
|
try { |
|
|
@ -56,7 +58,13 @@ namespace Kehyeedra3.Services |
|
|
|
await dmchannel.SendMessageAsync($"**Reminder from{remin} ago:**\n\n''{reminder.Message}''"); |
|
|
|
await dmchannel.SendMessageAsync($"**Reminder from{remin} ago:**\n\n''{reminder.Message}''"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch { await (await Bot._bot.GetUser(242040333309837327).GetOrCreateDMChannelAsync()).SendMessageAsync($"Time of error ^\n" + |
|
|
|
catch { if (LanChannel is null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IUser Lan = Bot._bot.GetUser(242040333309837327); |
|
|
|
|
|
|
|
LanChannel = await Lan.GetOrCreateDMChannelAsync(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await LanChannel.SendMessageAsync($"Time of error ^\n" + |
|
|
|
$"A fucky wucky has occurred, uwu\nFix wemindew sewwis dimwiwt" + |
|
|
|
$"A fucky wucky has occurred, uwu\nFix wemindew sewwis dimwiwt" + |
|
|
|
$"\nThis was the reminder: {reminder.Id} \nto: {reminder.UserId} \ntime: {reminder.Send.FromYeedraStamp()}"); } |
|
|
|
$"\nThis was the reminder: {reminder.Id} \nto: {reminder.UserId} \ntime: {reminder.Send.FromYeedraStamp()}"); } |
|
|
|
} |
|
|
|
} |
|
|
|