public async Task Subscribe(string name) { await Context.Message.DeleteAsync(); var embed = BlogHandler.SubscribeToBlog(Context.User.Id, name); await Context.Channel.SendMessageAsync("", false, embed); }
private Task OnReactionAdded(Cacheable <IUserMessage, ulong> cache, ISocketMessageChannel channel, SocketReaction reaction) { if (!reaction.User.Value.IsBot) { var msgList = Global.MessagesIdToTrack ?? new Dictionary <ulong, string>(); if (msgList.ContainsKey(reaction.MessageId)) { if (reaction.Emote.Name == "➕") { var item = msgList.FirstOrDefault(k => k.Key == reaction.MessageId); var embed = BlogHandler.SubscribeToBlog(reaction.User.Value.Id, item.Value); } } } return(Task.CompletedTask); }