コード例 #1
0
 public FriendlyDan(IFirehose firehose)
     : base(firehose)
 {
     Setup();
     m_firehose.SubUserActivity(this);
     m_firehose.SubCommandListener(this);
     s_instance = this;
 }
コード例 #2
0
        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);
            }
        }