private async Task HandleReminderAsync(IContext _, string context) { var reminder = JsonConvert.DeserializeObject <Reminder>(context); await new EmbedBuilder() .SetTitle("⏰ Reminder") .SetDescription($"```{reminder.Context}```") .ToEmbed() .QueueAsync(messageWorker, await discordClient.CreateDMAsync(reminder.UserId)); }
public async Task <IDiscordTextChannel> GetDMChannelAsync() { var currentUser = await client.GetSelfAsync(); if (Id == currentUser.Id) { throw new InvalidOperationException("Can't create a DM channel with self."); } return(await client.CreateDMAsync(Id)); }