public GenericReactions(IServiceProvider service) { Service = service; ReactionEvent moveDownReaction = new ReactionEventBuilder().WithEmoji("⏬").WithEvent(movePostDown).Build(); ReactionEvent deleteReaction = new ReactionEventBuilder().WithEmoji("❌").WithEvent(deletePostStart).Build(); ReactionEvent confrimDeleteReaction = new ReactionEventBuilder().WithEmoji("☑️").WithEvent(deletePostConfirm).Build(); service.GetRequiredService <ReactionService>().reactionList.Add(moveDownReaction); service.GetRequiredService <ReactionService>().reactionList.Add(deleteReaction); service.GetRequiredService <ReactionService>().reactionList.Add(confrimDeleteReaction); }
public void Load() { var reactionService = Service.GetRequiredService <ReactionService>(); ReactionEvent moveDownReaction = new ReactionEventBuilder().WithEmoji(recreatePostEmoji).WithEvent(movePostDown).Build(); ReactionEvent deleteReaction = new ReactionEventBuilder().WithEmoji("❌").WithEvent(deletePostStart).Build(); ReactionEvent confrimDeleteReaction = new ReactionEventBuilder().WithEmoji("☑️").WithEvent(deletePostConfirm).Build(); ReactionEvent pinMessageReaction = new ReactionEventBuilder().WithEmoji(pinPostEmoji).WithEvent(pinMessage).Build(); ReactionEvent unpinMessageReaction = new ReactionEventBuilder().WithEmoji(pinPostEmoji).WithRemoveEvent(unpinMessage).Build(); reactionService.reactionList.Add(moveDownReaction); reactionService.reactionList.Add(deleteReaction); reactionService.reactionList.Add(confrimDeleteReaction); reactionService.reactionList.Add(pinMessageReaction); reactionService.reactionRemovedList.Add(unpinMessageReaction); }