public FriendlyDan(IFirehose firehose) : base(firehose) { Setup(); m_firehose.SubUserActivity(this); m_firehose.SubCommandListener(this); s_instance = this; }
public static async Task <bool> CheckForMutualFriendsAndMessageIfNot(IFirehose m_firehose, ChatMessage msg, int actionReceiverId, string action) { if (HasAdvancePermissions(msg.UserId) || FriendlyDan.AreMutualFriends(msg.UserId, actionReceiverId)) { return(true); } else { await SendResponse(m_firehose, msg.ChannelId, msg.UserName, $"You need to be mutual friends with {await MixerUtils.GetUserName(actionReceiverId)} before you can {action} them. You both need to friend each other with the \"^friends add\" command.", msg.IsWhisper); return(false); } }